We study the effect of baryonic processes on the shapes of dark matter ( DM ) haloes from Illustris , a suite of hydrodynamical ( Illustris ) and DM-only ( Illustris-Dark ) cosmological simulations performed with the moving-mesh code arepo . DM halo shapes are determined using an iterative method based on the inertia tensor for a wide range of z = 0 masses ( M _ { 200 } = 1 \times 10 ^ { 11 } -3 \times 10 ^ { 14 } M _ { \odot } ) . Convergence tests shows that the local DM shape profiles are converged only for r > 9 \epsilon , \epsilon being the Plummer-equivalent softening length , larger than expected . Haloes from non-radiative simulations ( i.e . neglecting radiative processes , star formation , and feedback ) exhibit no alteration in shapes from their DM-only counterparts : thus moving-mesh hydrodynamics alone is insufficient to cause differences in DM shapes . With the full galaxy-physics implementation , condensation of baryons results in significantly rounder and more oblate haloes , with the median minor-to-major axis ratio \left < s \equiv c / a \right > \approx 0.7 , almost invariant throughout the halo and across halo masses . This somewhat improves the agreement between simulation predictions and observational estimates of the Milky Way halo shape . Consistently , the velocity anisotropy of DM is also reduced in Illustris , across halo masses and radii . Within the inner halo ( r = 0.15 R _ { 200 } ) , both s and q ( intermediate-to-major axis ratio ) exhibit non-monotonicity with galaxy mass , peaking at m _ { * } \approx 10 ^ { 10.5 - 11 } M _ { \odot } , which we find is due to the strong dependence of inner halo shape with galaxy formation efficiency . Baryons in Illustris affect the correlation of halo shape with halo properties , leading to a positive correlation of sphericity of MW-mass haloes with halo formation time and concentration , the latter being mildly more pronounced than in Illustris-Dark .