This paper introduces a tool designed to optimize electric vehicle (EV) charging infrastructures within the smart grid framework. The tool utilizes a multi-objective approach and is programmed in Python. It enables dynamic management of energy distribution among different EV charging infrastructures, addressing scenarios where surplus photovoltaic (PV) power generation exceeds charging demands but faces challenges due to storage costs and electric energy transmission rates to alternative infrastructures. In instances of low PV production relative to charging demand, the algorithm strategically selects the optimal procurement strategy, either purchasing electric energy from neighboring infrastructures or utilizing surplus PV energy for direct charging. The tool empowers stakeholders to make informed decisions by facilitating comparisons between the cost of storing electric energy locally and the expense of procuring it from external sources, thereby enhancing the efficiency and cost-effectiveness of EV charging infrastructures in the smart grid ecosystem. Extensive simulations and case studies demonstrate the efficacy of the proposed approach, showcasing its potential to optimize energy distribution and promote sustainable practices within the EV charging domain.