We study the shapes of galaxy dark matter haloes by measuring the anisotropy of the weak gravitational lensing signal around galaxies in the second Red-sequence Cluster Survey ( RCS2 ) . We determine the average shear anisotropy within the virial radius for three lens samples : the ‘ all ’ sample , which contains all galaxies with 19 < m _ { r ^ { \prime } } < 21.5 , and the ‘ red ’ and ‘ blue ’ samples , whose lensing signals are dominated by massive low-redshift early-type and late-type galaxies , respectively . To study the environmental dependence of the lensing signal , we separate each lens sample into an isolated and clustered part and analyse them separately . We address the impact of several complications on the halo ellipticity measurement , including PSF residual systematics in the shape catalogues , multiple deflections , and the clustering of lenses . We estimate that the impact of these is small for our lens selections . Furthermore , we measure the azimuthal dependence of the distribution of physically associated galaxies around the lens samples . We find that these satellites preferentially reside near the major axis of the lenses , and constrain the angle between the major axis of the lens and the average location of the satellites to \langle \theta \rangle = 43.7 ^ { \circ } \pm 0.3 ^ { \circ } for the ‘ all ’ lenses , \langle \theta \rangle = 41.7 ^ { \circ } \pm 0.5 ^ { \circ } for the ‘ red ’ lenses and \langle \theta \rangle = 42.0 ^ { \circ } \pm 1.4 ^ { \circ } for the ‘ blue ’ lenses . We do not detect a significant shear anisotropy for the average ‘ red ’ and ‘ blue ’ lenses , although for the most elliptical ‘ red ’ and ‘ blue ’ galaxies it is marginally positive and negative , respectively . For the ‘ all ’ sample , we find that the anisotropy of the galaxy-mass cross-correlation function \langle f - f _ { 45 } \rangle = 0.23 \pm 0.12 , providing weak support for the view that the average galaxy is embedded in , and preferentially aligned with , a triaxial dark matter halo . Assuming an elliptical Navarro-Frenk-White ( NFW ) profile , we find that the ratio of the dark matter halo ellipticity and the galaxy ellipticity f _ { h } = e _ { h } / e _ { g } = 1.50 _ { -1.01 } ^ { +1.03 } , which for a mean lens ellipticity of 0.25 corresponds to a projected halo ellipticity of e _ { h } = 0.38 _ { -0.25 } ^ { +0.26 } if the halo and the lens are perfectly aligned . For isolated galaxies of the ‘ all ’ sample , the average shear anisotropy increases to \langle f - f _ { 45 } \rangle = 0.51 _ { -0.25 } ^ { +0.26 } and f _ { h } = 4.73 _ { -2.05 } ^ { +2.17 } , whilst for clustered galaxies the signal is consistent with zero . These constraints provide lower limits on the average dark matter halo ellipticity , as scatter in the relative position angle between the galaxies and the dark matter haloes is expected to reduce the shear anisotropy by a factor \sim 2 .