Nowadays, choosing of heating source is emphasized. On the market there are different types of heat sources, which need to be properly designed to the required heating output. Finally, it is necessary to take into account the possibilities of fuel burning as well as heat transfer substance. Heating system is dependent on regional weather conditions, where the building is located. All these factors ultimately, with proper design of the heat source, could reduce operating costs in the heating season. Currently in the design of the heating system, there are taken into account the greatest possible energy savings. It is therefore to encourage bigger utilization of renewable energy sources.Currently has the highest proportion of total energy consumption in the buildings, energy for heating. For this reason, the expert and research community seeks to reduce energy consumption at the lowest possible value. For this purpose, people are starting to apply renewable energy sources. These devices using renewable energy sources convert energy from the environment. Most of them are transforming energy from the sun, earth, water and air. This energy is then used directly for heating. In this article we will more closely deal with transforming solar energy into electricity using photovoltaic panels and we will focus on the interaction between the photovoltaic system and heating and cooling system, under certain conditions. Produced electric energy is used for heating system in the school building in Spišská Nová Ves in Slovakia.