This document presents a study on improving the power quality of a grid-connected renewable energy system using a STATCOM controller. The system includes photovoltaic cells and a wind turbine connected to the grid along with nonlinear loads. A STATCOM controller is proposed to reduce current harmonics and support reactive power. The system is simulated in MATLAB/Simulink under four cases: with STATCOM and renewable sources, with only STATCOM, with only wind, and without STATCOM or wind. Results show the STATCOM is effective at reducing total harmonic distortion of source current and voltage and improving power factor.