It needs them to produce carbon dioxide to grow its product and it uses the surplus energy to produce electricity.
(them; to produce; carbon dioxide) (it; uses; the surplus energy; to produce electricity)
them it
to produce uses
carbon dioxide
the surplus energy to produce electricity