In purely c-axis oriented PbZr$_{0.2}$Ti$_{0.8}$O$_3$ ferroelectric thin films, a lateral piezoresponse force microscopy signal is observed at the position of 180{deg}domain walls, where the out-of-plane oriented polarization is reversed. Using electric force microscopy measurements we exclude electrostatic effects as the origin of this signal. Moreover, our mechanical simulations of the tip/cantilever system show that the small tilt of the surface at the domain wall below the tip does not satisfactorily explain the observed signal either. We thus attribute this lateral piezoresponse at domain walls to their sideways motion (shear) under the applied electric field. From simple elastic considerations and the conservation of volume of the unit cell, we would expect a similar lateral signal more generally in other ferroelectric materials, and for all types of domain walls in which the out-of-plane component of the polarization is reversed through the domain wall. We show that in BiFeO$_3$ thin films, with 180, 109 and 71{deg}domain walls, this is indeed the case.