Well, for starters, you cannot replace the PCM without programming it to the car. There is no such thing as a "programmed key" The PCM and key have to be programmed to match the car. If not, you will have a "no crank-no start" problem. The original PCM was probably bad, but take the whole car back to the dealer and have them do the programming with the new keys and PCM---make sure you have a minimum of two keys. I am pretty sure that a Ford dealer is the only place you can have programming like this done.
Good luck and I hope this helps.
Thanks for asking.