Customers energy consumption pattern affects directly the grid burden, especially during peak hours. In recent years, many different control methods have been proposed to shift the energy consumption to off-peak hours through demand response (DR) management. In order to have effective DR energy management, optimization has a key role. Thus, increasing the benefits for the customers and encouraging them to consider the new controlling approaches in their daily energy consumption pattern is needed for increased customer participation. On the other hand, renewables are integrated with the buildings to decrease the buildings' energy costs and dependency on the grid utilities. This study moves a step further and considers a few numbers of neighboring houses as an energy community. The community commits to sharing their produced energy from the individual distributed solar system with each other and increasing their energy selfsufficiency by minimizing the import and export of power from/to the grid. This research focuses on applying common electric heat energy storage when community's own solar PV generation is used to thermal energy generation/storing in heat storage and compares it with the case in which each house has its own distributed thermal energy storage. Then, different sized thermal storages are tested for the community to find the best solution. The results are compared in terms of import and export of energy, annual costs and the payback-time. It is concluded that the community with common thermal energy storage could decrease the energy exchange with the grid and the payback-time of the investments could be reduced for the community members.INDEX TERMS Demand response, energy community, renewable energy resources, sustainable energy community, thermal energy storage