You will need a wiring diagram.
Basically the fuel pump relay looks for one of two conditions for the relay to engage. The first is the starter on signal #50. This is the same as the starter gets at the solenoid to engage the starter. If the relay sees the starter signal it will turn on during that signal.
The second condition is engine speed. This signal is converted from a standard primary ignition signal into a square wave pulse signal by the ignition control unit. If the relay sees 300rpm it turns on.
The relay has some other functions depending on the year. It limits engine speed by cutting the fuel pumps at a certain RPM and it controls tranmission kickdown limits similarly.
Owner 24 bay BSC
Bosch Master, ASE master L1
26 years MB technician