We propose an integrated phase corrector that efficiently couples the light distorted by atmospheric turbulence into single-mode fibers for the use of free-space optical communication and photonic spectrographs. The integrated circuit consists of an array of gratings that couple light from the subapertures of the telescope pupil into single-mode waveguides in the photonic integrated circuit (PIC). Resistive elements are used to modulate the refractive index in a coiled segment of the waveguides and shift their phases accordingly. The co-phased beams are combined and delivered to an output single-mode fiber (SMF), where the collected flux is predicted to be greater than that coupled directly without correction into a single-mode fiber at the focus of the telescope.