This paper focuses on an active shunt compensator suitable for reactive, unbalanced and harmonic loads under both balanced and unbalanced operating conditions of the grid. A stationary reference frame based controller with multiple resonant peaks (proportional + multiresonant controller) is used in order to achieve high accuracy of current compensation. However, the performance of the system depends to a great extent on the PLL structure or unit vector generation process. Under unbalanced grid voltage condition, SRF PLL becomes inefficient because of the presence of double the fundamental frequency components in D- and Q- axis voltages. A similar situation is true for the DC bus voltage as it supplies the oscillatory power during unbalanced compensation. This phenomena results in degradation of the grid current power quality. A resonant filter is adopted in the PLL and DC voltage loop to mitigate the problems. The simulation and experimental results are presented to verify the effectiveness of the scheme.