Non-volumetric work associated with the increase in polarization in a dielectric is equal to $dW = E dP$, where $E$ and $P$ are vectors of the electric field and the total polarization in the dielectric (for a homogeneous sample, $P$ is equal to the electric dipole moment per unit volume times volume).
The question is how to show that if in a substance an increase in polarization due to compression is observed, it follows from phenomenological thermodynamics laws that introducing the same substance into the electric field $E$ will cause its mechanical deformation (the so-called piezoelectric effect).