i have a 1998 f150 when u step on brakes headlights come on if you turn on headlights and put it in reverse the truck dies

wiring short somewhere, trace the wiring and grounds too. And of course have the battery an
d alternator load tested, places like auto zone do that free