Fuel Pump problems

Fuel pump works OK, was tested, but car cuts out all the time as fuel not getting to engine.
Mechanic thought it was the fuel pump relay.
Thought perhaps it was not the relay but the fuse box under the headlight.
But was told that fuse box might need to be coded.
Anyone had this problem?
Any ideas on how to fix this?
Last edited: