Because of the rise in diesel and butane prices widely used for pumping, added to their negative impact on both Morocco's environment and trade balance, the use of renewable energies should sound obvious, practical and cost effective. This study offers the transformation of a traditional butane pumping system (BPS) and diesel pumping system (DPS), located on a farm nearby the city of Agadir, into an optimized solar pumping system (SPS). The suggested method is based on a techno-economic study according to the "Business-As-usual" scenario. As a first step, we have dimensioned our pumping system and chosen the elements that constitute it. As a second step, we carried out an economic analysis, based on the calculation of all costs, which makes it possible to ensure the viability of the components of our SPS over its life cycle and brought it to a discounted value. The processing of the different data is made possible thanks to the computer application "PVDesign" which we have developed. This application has allowed us to carry out a comparative study of several techniques of pumping systems. The result of the study is that the SPS beats the other systems at various levels, namely economic, environmental and technical.