Involved in the biosynthesis of the hopanoid precursor squalene (SQ) from farnesyl diphosphate (FPP). Catalyzes the third (last) step, the reduction of hydroxysqualene (HSQ) to SQ. FAD + H(+) + H2O + squalene = FADH2 + hydroxysqualene Secondary metabolite biosynthesis; hopanoid biosynthesis. Belongs to the HpnE family.