This paper presents a smart switching mechanism to optimize and control of industrial shunt active power filters. The aim is to design a low-cost shunt active filter with a reliable switching mechanism that integrates to industrial loads at the point of common coupling. Traditionally, the shunt active power filter is linked to all of the system's loads. The size and capacity of the shunt active filter can be decreased by connecting fewer loads. In industries, some loads don't contribute much to harmonic distortion and maybe overlooked while compensating for it. The smart switching mechanism has been used to categorise necessary loads based on two constraints: individual load THD and shunt active filter peak current at a particular instance. This switching mechanism is implemented using the classification learner application in Matlab. Smart switching connects the appropriate loads to the shunt active power filter automatically. The shunt active filter is optimized using Fuzzy Logic-DC voltage control. The Matlab/ Simulink simulation model was developed to test the effectiveness of the above-mentioned strategy.