This paper proposes a shunt Active Power Filter (APF), supported by Solar Photovoltaic (SPV) system for a grid-connected application that improves power quality. The reference signal for the shunt APF is obtained from the adaptive Proportional Integrative Derivatives (PID), based on an algorithm of Least Mean Eighth (LME) with Unit Vector Template (UVT). The LME algorithm distinguishes the basic weight sections from load currents and estimates the three phase reference source current. These reference currents are used to generate a gate signal for the shunt APF. The DC-link voltage regulator is used to keep the constant DC-link voltage of the shunt APF with an APID controller. To reduce present distortions of electric power distribution systems, a design of a suitable controller is conducted using an intelligent computational technique for predicting the right reference signals. The SPV scheme is designed to obtain the highest energy output from the SPV panel with the maximum power point tracking algorithm (MPPT) scheme and is connected to the power grid. For long-term harmonic mitigation, the SPV system continuously maintains the DC-link of the shunt APF. Mathematically, the presented current reference signal generation scheme is examined and digital simulation outcomes are displayed under distinct steady and dynamic state conditions. Lastly, the complete scheme is validated by using the hardware prototype.