The process in which glucose is oxidized, coupled to NADPH synthesis. Glucose 6-P is oxidized with the formation of carbon dioxide (CO2), ribulose 5-phosphate and reduced NADP; ribulose 5-P then enters a series of reactions interconverting sugar phosphates. The pentose phosphate pathway is a major source of reducing equivalents for biosynthesis reactions and is also important for the conversion of hexoses to pentoses.