Reference: Daniel V. Schroeder, An Introduction to Thermal Physics, (Addison-Wesley, 2000) – Problem 3.2.
The definition of temperature in terms of entropy is
Systems in thermal equilibrium have equal slopes in their entropy-versus-energy graphs and therefore have the same temperature.
A statement often known as the zeroth law of thermodynamics states that if a system is separately in thermal equilibrium with two other systems and , then and are in thermal equilibrium with each other. This is fairly obvious from the definition of temperature above, since any two systems in thermal equilibrium have the same values of , so systems and must both have the same slope as system , and therefore have the same slopes as each other. [I’m not sure that constitutes a ‘proof’, but it’s the best I can do.]
The zeroth law is the basis of the thermometer, for it states that a system (the thermometer) can be placed in thermal equilibrium with any number of other systems that are all in thermal equilibrium with each other, and it will always give the same reading.