As staff and students were on half-term break 307 solar panels were installed on the roof of Downlands Community School and sports centre.
Staff from Solar Resources and PDP Solar completed the work for the project paid for by nearby investors.
The Downlands School Solar Project is led by a new non-profit community energy group, HKD Energy.
It will provide the school with a cheap source of green electricity, and will also help students learn about renewable energy, energy security and reducing greenhouse gas emissions.
Community investors earn a return on their investment as a result of the electricity from the solar panels that is sold back to the grid.
Head teacher Rose Hetherton said: “Downlands Community School works hard to retain and establish positive links with our local communities within the villages we serve.
“We were therefore delighted that the link established many years ago with HKD transition developed into this groundbreaking and innovative project that has direct benefit to both the school and the local community in so many different ways.
“We are delighted as a school to be one of the first in the country to have their solar panels funded by investors from our community and many of them being parents with pupils in the school. For a number of years West Sussex had been encouraging schools to work with the big corporate companies who clearly have taken all the financial benefits for themselves.
“The school will benefit from cheaper electricity prices, but also through the educational opportunities of ensuring our pupils can monitor and learn about the huge benefits of green electricity. They are the adults of the future who must act now to work on sustainable forms of electricity and the benefits this has for our community, planet and our purses!
“We are all winners and I am delighted that Downlands was given this opportunity.”
The 307 solar panels have a peak power output of 80 kilowatts and will produce over 80,000 kilowatt hours of electrical energy each year – enough to make 4 million cups of tea.
840 tonnes of carbon emissions will be saved over the project’s life.
Downlands School will save around £150,000 in electricity costs over the next 20 years, as a result of the cheaper power provided by the project.