This paper proposes a grid code for photovoltaic (PV) integration to mitigate overvoltage and voltage variation problems caused by a large amount of PV generation in distribution circuits. According to the simulation results, PV generation causes overvoltage and voltage variation problems in distribution circuits. To mitigate the overvoltage and voltage variation problems due to the high penetration of PV generation, the proposed grid code employs the inverter of PV to absorb reactive power using a fixed power factor control approach. This control approach instructs the inverter of each PV to absorb reactive power so that the PV power factor is fixed at the desired value determined by the reactance to resistance ratio of the equivalent impedance at the PV location. The results show that the proposed grid code is effective in reducing the voltage variation of the test feeder and mitigating the overvoltage condition due to PV generation.