This paper discusses the use of a shunt active power filter (SAPF) with a PI controller to mitigate harmonics in single-phase non-linear loads, addressing power quality issues caused by harmonic distortion. The implementation of the SAPF is demonstrated through MATLAB/Simulink simulations, showing a significant reduction in total harmonic distortion (THD) for both current and voltage. The results indicate that the proposed method effectively enhances power quality and system efficiency.