This paper presents an h-infinity robust loop shaping control and LCL filter to mitigate the effects of harmonic currents in the photovoltaic system integrated with the grid. To eliminate the negative effects of the LCL filter, this work applied notch filter active damping. Existing methods for the elimination of harmonic currents were reviewed. Proportional integral control, fuzzy logic control, h-infinity control, and robust loop shaping control are presented. The grid current was analyzed in the system with all controllers applied to control the voltage source inverter of the system to eliminate harmonics in the grid current caused by the inverter and nonlinear loads for two cases, one being constant loading of the linear and nonlinear load and another is the switching of the nonlinear load during the simulation. The results obtained from the proposed method for the two tests conducted were compared with those from other methods to prove the robustness of the proposed technique. The method manages to reduce the total harmonic distortion of the grid current from 7.85% to 0.79% for case 1 and from 11.67% to 1.14% for case 2.