How do you shoot a portal on the moon in Portal 2?

Quick answer: When the roof breaks open, shoot a portal at the moon in the sky. The other portal must be on the Conversion Gel under Wheatley.
Show walkthrough (story spoilers)
When it happens
At the very end of the Wheatley fight, after the Stalemate Resolution Annex, the building starts to explode. The ceiling breaks open and you can see a huge moon in the sky.
Place the portals
Your other portal must already sit on the Conversion Gel near Wheatley. Aim up through the hole in the roof and shoot a portal at the moon. The moon’s surface is made of the same stuff as the gel, so the portal sticks.
What happens
The two portals connect and the vacuum of space pulls everything through, including you and Wheatley. A cutscene takes over from here.
If you miss
Take your time to aim; the moment waits for you. See the Part Where He Kills You walkthrough for the ending.
