A thermodynamic phase transition denotes a drastic change of state of a physical system due to a continuous change of thermodynamic variables, as for instance pressure and temperature. The classical van der Waals equation of state is the simplest model that predicts the occurrence of a critical point associated with the gas-liquid phase transition. Nevertheless, below the critical temperature, theoretical predictions of the van der Waals theory significantly depart from the observed physical behaviour. We develop a novel approach to classical thermodynamics based on the solution of Maxwell relations for a generalised family of nonlocal entropy functions. This theory provides an exact mathematical description of discontinuities of the order parameter within the phase transition region, it explains the universal form of the equations of state and the occurrence of triple points in terms of the dynamics of nonlinear shock wave fronts.