Monitoring open/closed-circuit on a mains line
simulate this circuit &ndash; Schematic created using CircuitLab

Figure 1. (a) What you've got. (b) Simple solution. (c) Better solution.

The simplest solution is to rewire to use the thermostat as the inverter power switch.
The thermostat is unlikely to have a good DC rating as it is designed to switch AC at much lower currents than the DC current required by the inverter. 

To protect the thermostat and prevent malfunction use (c). Here a relay (coil voltage to match battery voltage) is switched by the thermostat. A contact of the relay (rated for the maximum DC current of the inverter) switches on the inverter.



Update after new constraints were added to the question.







simulate this circuit

Figure 2. Periodic test circuit.

As you have probably realised, you can't test the thermostat wihout powering up the circuit. Any low-voltage test circuit you add across the thermostat will be destroyed if the thermostat opens when power is switched on.

With Figure 2 you can enable the inverter periodically, wait a second or two for it to power up and then check the status of RLY1. If it's on then you know that you should keep the inverter running until RLY1 drops out due to the thermostat opening (because the fridge has got cold again). If during the periodic test the relay isn't on then shut down the inverter.