Building roofs are a good option for installing photovoltaic systems on them. So, the energy produced by the panels could cover a part or even the whole of the energy needed by the respective building. If the energy produced would exceed the energy demand, the surplus energy could be injected into the grid without any changes to the grid. In the present paper, a technical-economic study was carried out on the installation of a photovoltaic system on the roof of a commercial building. For a more accurate estimate of the electricity produced by the photovoltaic system, a shading study was carried out for the roof of the building. For this case study, it was observed that when shading is taken into account, the estimated energy is almost 11% lower than when shading is not considered. For the economic analysis, we started from the hypothesis that all the energy produced by the PV system will be injected into the electrical grid. Under these conditions, the beneficiary will recover his investment in approximately 7 years.