Right. That was a busy episode.
I had assumed that the Doctor might be absent for a chunk of the running time seeing as he had been shut in the ultimate prison. Oh no. As it turns out all you need is some lovely circular time travel logic.
Future Doctor travels back in time (using River Song's vortex manipulator) and gives Plastic Rory his sonic screwdriver that will release the present Doctor. Then Amy is placed in the Pandorica as it's such a good prison not even death is an escape. It will keep her not-quite-dead until a sample of her living DNA can be found. Plastic Rory offers to stand guard over the box to keep Amy safe.
So now it's 1996 again. Seven year old Amelia is praying to Santa if he could send someone to fix the crack in her wall. There is a noise outside and she goes to the window and sees... Well nothing as it happens. In the sky there is the moon but no stars. We discover that this universe has the Earth in it and nothing else. The rest of the universe doesn't exist.
Amelia finds a museum leaflet telling her to visit the Pandorica exhibition. She does so and we also see a stone Dalek display in the museum. She presses her hand on the box and it opens having got the DNA it needs to revive adult Amy.
The Doctor appears and uses the vortex manipulator to go back and give Rory the sonic screwdriver and Amelia the museum leaflet. Sorted.
Except the light from the Pandorica revives one of the stone Daleks and it attacks. Plastic Rory appears in a museum security guard uniform. He has continued watching over Amy. The stone Dalek shoots a version of the doctor from 12 minutes in the future.
Yes, as Amy says, it's complicated.
On the roof of the museum they see what looks like the sun, except it is the Tardis exploding, the only thing keeping the earth from been wiped from existence like the rest of the universe. The doctor rescues River Song who has been caught in a time loop.
The Doctor does indeed get shot by the dalek. In a neat little scene River faces off against the Dalek and it asks for "Mercy!" Not likely.
The Doctor is placed in the Pandorica. He realises the light from it will interact with the Tardis explosion and create Bing Bang 2 that will restore the universe. The only problem is that he will be on the wrong side of the explosion and will disappear because everyone will forget he has existed.
He launches the Pandorica towards the exploding Tardis and sure enough the universe is put right. The Doctor finds himself rewinding back through time. When he gets to 1996 he finds Amelia sleeping in the garden where she was waiting for him to return. He tells her to remember him.
It is 2010 and Amy is getting married. She is surprised to find her parents alive but is not sure whey she is surprised. At the wedding reception she is handed River Song's blue Tardis "spoiler" book and find s herself crying because she is sad but can't remember why. Then she remembers the Doctor and stands up and shouts that her imaginary friend was real. Cue much embarrassment from the guests. Until the Tardis appears in their midst.
Later the Doctor wonders what caused the Tardis to malfunction in the first place but the phone rings with the promise of a new adventure in store. The episode ends with the Doctor, Amy and Rory setting off once more.
This summary really can't adequately describe what a clever scripe Steven Moffat has come up with. The mad thing is that it all makes sense as well as tying up the preceding 12 episodes together.
Now, where can I get an Amy Pond action figure?