I have that system. It works because the electromagnet coil is just a few turns of thick copper wire. The few mV from the thermocouple can thus drive an Amp or so through the coil.They placed a thermocouple under the pilot flame, and as long as it was lit it generated voltages, in the millivolt range, that held a small solenoid open in the burner control assembly, allowing gas to flow to the burners, if heat was called for. If the pilot went out for some reason, the thermocouple stopped generating voltage and the solenoid closed off the gas to the whole system.