So if you go and have solar panels installed onto your roof, the excess energy goes into the grid, and if you produce enough energy you receive a credit from the energy company. Of course in the area I live permission has to be granted from the energy company to install solar panels, same goes for small scale wind generators.