Using the wiring diagram as shown above, identify which spade terminals connect( make) and which are open (break) with the switch in the "on" position. A diesel injector pump solenoid should be connected through the make terminals, a petrol engine the coil.Take a wire feed off the switched live terminal into one of the normally broken spade terminals,connect your resistor to the other side of this pair, from the other end of the resistor connect it to an earth point. Thus with the switch "on" the main feed is connected to the starter and the rest of the electrics,the fuel solenoid can be energised,changing to "off" cuts the main supply,cuts the solenoid supply, any residual voltage gets dumped to earth back through the resistor.