This paper presents a combined system of a three-phase four-wire shunt active power filter (SAPF) and photovoltaic generator (PVG) to improve power quality by mitigating issues such as harmonic currents and poor power factor. The proposed system is validated through MATLAB/Simulink simulations, demonstrating effective performance in energizing the grid and maintaining balance under varying loads while implementing a maximum power point tracking (MPPT) technique based on perturb and observe. Results indicate significant reductions in total harmonic distortion (THD) and improved sinusoidal source currents, confirming the SAPF's effectiveness in enhancing power quality.