Fires in photovoltaic (PV) electrical systems are a real and serious problem because this phenomenon can have severe consequences for the safety of people and the environment. In some cases, fires result from a lack of maintenance or improper installation of PV modules. It is essential to consider prevention and continuous monitoring of the electrical parameters to minimize these risks, as these factors increase the temperature of the photovoltaic modules. The use of thermal analysis techniques can prevent hotspots and fires in photovoltaic systems; these techniques allow detecting and correcting problems in the installation, such as shadows, dirt, and poor-quality connections in PVs. This paper presents a case study of the implementation of thermal analysis in an installation of photovoltaic modules connected to a solar pumping system to identify the formation of hotspots through thermal images using an unmanned aerial vehicle (UAV). Here, a novel methodology is proposed based on the comparison of temperature increases concerning the values of short circuit current, open circuit voltage, and real efficiency of each PV module. In addition, an electrical safety methodology is proposed to design a photovoltaic system that prevents fires caused by hotspots, contemplating critical parameters such as photovoltaic power, number of photovoltaic modules, DC:AC conversion ratio, electrical conductor selection, control devices, and electrical protection; the performance power expected was obtained using standard power test conditions, including irradiance factor, photovoltaic module (PVM) temperature factor, and power reduction factor.