The integration of Nonlinear Loads (NLs) in industrial, commercial and residential settings over the past two decades has significantly worsened power quality issues in modern electrical distribution networks. In today's modern era, the growing use of sensitive and expensive electronic devices makes it crucial to ensure power quality for the reliable and secure functioning of the power system. Shunt Active Power Filters (SAPF) are necessary to prevent current distortions caused by NLs from entering the grid. Otherwise, system effectiveness and power transmission capabilities would be diminished. In this work, we introduce a novel Predictive Direct Power Control (PDPC) strategy incorporating generating reference signals for SAPF model of a Three-level (3 L) Neutral-Point Clamped (NPC) inverter. This innovative system serves as a SAPF, specifically designed to attenuate the harmonics emerging from abrupt increments in NLs. Moreover, it proactively addresses the challenge of reactive power within distribution systems. Utilizing an Enhanced Incremental Conductance (EINC) Maximum Power Point Tracking (MPPT) algorithm, the Photovoltaic (PV) module effectively optimizes power extraction, thereby augmenting the efficiency of the SAPF integration. This system is adept at satisfying the reactive power demands of the load by mitigating harmonics induced by the NLs while concurrently supplying active power harnessed from the PV arrays. The incorporation of the Adaptive Neuro-Fuzzy Inference System (ANFIS) algorithm facilitates the stabilization of the DC link voltage, further contributing to the system's capability to meet reactive power requirements and elevate grid Power Quality (PQ) through the elimination of harmonics. The proposed strategy effectively reduces harmonics and maintains stable DC link voltage in variable linear and NLs load conditions. This system has been systematically designed, simulated, and experimentally validated, with results across various phases demonstrating its superior performance and enhanced efficiency in improving power quality.