Please replace the fuel pump wiring harness. The original pump wiring harness is known to have manufacturing defects; which have led to countless perfectly good fuel pumps being condemned and needlessly trashed. That is why manufacturers of quality replacement fuel pumps include a new fuel pump wiring harness in the box. But that unfortunately does not motivate people to install that part along with the pump. New fuel pump wiring harnesses can also be bought separately at good auto parts stores, for a very low price.
The other 2 parts which can cause this problem are a defective camshaft position sensor; which cuts off the trigger pulses to the fuel injectors; or a defective crankshaft position sensor; which cuts off the ignition sparks. A bad fuel pump relay can also do this; as can a fuel filter that has become clogged.