There are different ways to invest in a solar farm in return of company shares. You can either buy shares of a solar company that owns or operates a solar farm, or you can join a community solar project that allows you to own a portion of a solar farm and receive dividends from the electricity generated.