I have an older fridge that will run all day with no voltage, but the new ones will shut off gas when power is gone. Just run a toggle switch inline with the DC power is all you need to do. Cut the wire going to the fridge and splice in a new wire, run it to wherever you want a switch to be, and then run it back. This will be done on the DC power supply positive wire feed.
Any DC toggle switch from hardware store will work.
This is something that is a silly concern, but you asked for how to and not why this is a waste of time, so hope I answered,
There is very, very little chance of a fridge igniting gas fumes, esp that the fridge is in the trailer 20-30 feet from the pump and in a different vehicle altogether. Could the piezo ignition spark ignite fumes? No, you would pass out from the fumes before enough fumes go the the fridge compartment anyway.
Could the spark cause an electric current to run through the grounding wiring and throughout the trailer cord, or tow ball, and jump a spark over to the fuel pump and cause an issue? HAHA, now Im getting silly. Likely on most vehicles the gas tank opening is electrically isolated from the vehicle too.