1988 ford f150

I have a 1988 ford f150, staright 6, manual, no air, 4X4. The truck shuts off at times while driving/running and at other times just will
not start. Compression is good, engine has spark. I have found that if i "tap" on the external fuel pump, located on the driver side frame, it will start back up . I bought a new external fuel pump but have not installed it as of yet. My question is: Is this the fuel pump since it starts after tapping it or is it possibly something else? I am lost and I am not a mechanic. Any help will be greatly appreciated. If I did not give enough information just let me know. Thanks!
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
Add image file

Motorsforum.com is a website by car enthusiasts for car enthusiasts. It is not affiliated with any of the car or spare part manufacturers or car dealers discussed here. All logos and trade names are the property of their respective owners.