When applying the brakes the fuel pump and the heater runs,and when the right signal light is turned on the fuel pump and the heater goes off and on. Just thinking out loud could a faulty bulb be the problem.
You didn't mention what type of vehicle. However, on many older vehicles this type of problem is from a disconnected ground wire at the instrument panel, or possibly even at one of the taillights. The brake lights being on will provide a path to ground, and that allows the ungrounded circuits to work.
On newer vehicles where everything is controlled by the computer, its usually more complicated. Sensors feed input to the computer, and it decides when certain accessories should be turned on.