How can I flash the stock rom?

My FP2 doesn’t boot properly after I damaged the platform.xml and performed a hard reset.
Now I downloaded the stock rom.
How can I install that so that my phone will be like just delivered?
I am a beginner!

Perhaps the info you need is in this thread.

I am a beginner!
Though I first stored the FP2-gms36-1.1.7-ota.zip on my sdcard.
Then I booted into recovery mode (at least I think so) and chose “install update from sdcard” and pointed to the ota.zip .
The phone installed it but after the reboot I got error messages like “google services are terminated” as well as Hangouts and more about terminated google services.
I can’t finish the setup wizard because of the failure messages (google services are
terminated) and the wizard itself gets terminated. These messages began before
flashing after a mistake in editing the platform.xml because the storage (ore internal sdcard?) and the external sdcard weren’t recognized any more.
Did I make any mistake concerning the flashing?
I guess that the storage partition has to be recovered or created new?
I want the phone to be as it was delivered. What else do I have todo?
Could anybody help me because I am a bit despaired about my newe phone and begin to get hopeless.
Do I have to send my phone back to FP?