We use numerical simulations to investigate how the statistical properties of dark matter (DM) haloes are affected by the baryonic processes associated with galaxy formation. We focus on how these processes influence the spin and shape of a large number of DM haloes covering a wide range of mass scales, from galaxies to clusters at redshifts zero and one, extending to dwarf galaxies at redshift two. The haloes are extracted from the OverWhelmingly Large Simulations, a suite of state-of-the-art high-resolution cosmological simulations run with a range of feedback prescriptions. We find that the median spin parameter in DM-only simulations is independent of mass, redshift and cosmology. At z=0 baryons increase the spin of the DM in the central region (<=0.25 r_200) by up to 30 per cent when feedback is weak or absent. This increase can be attributed to the transfer of angular momentum from baryons to the DM, but is no longer present at z=2. We also present fits to the mass dependence of the DM halo shape at both low and high redshift. At z=0 the sphericity (triaxiality) is negatively (positively) correlated with halo mass and both results are independent of cosmology. Interestingly, these mass-dependent trends are markedly weaker at z=2. While the cooling of baryons acts to make the overall DM halo more spherical, stronger feedback prescriptions tend to reduce the impact of baryons by reducing the central halo mass concentration. More generally, we demonstrate a strongly positive (negative) correlation between halo sphericity (triaxiality) and galaxy formation efficiency, with the latter measured using the central halo baryon fraction. In conclusion, our results suggest that the effects of baryons on the DM halo spin and shape are minor when the effects of cooling are mitigated, as required by realistic models of galaxy formation, although they remain significant for the inner halo.