Distribution system operators continually grapple with the challenge of minimizing Total Line Losses (TLLs). In response, our research integrates Shunt Capacitors (ShCs) and deploys the Improved Grey Wolf Optimizer (I-GWO) algorithm to determine the optimal sizing and placement of these capacitors. The analysis is conducted considering multiple constraints, such as line limitations, load point voltage levels, and prescribed capacitor thresholds. The approach is evaluated on IEEE distribution systems with 10, 15, 85, and 118 buses, ensuring a realistic assessment. Our results underscore the superior performance of the proposed algorithm when compared to existing literature, offering an effective solution for reducing losses in electric networks.