Biogas to power

A biogas genset is a gas engine coupled to an alternator. The engine burns biogas. The alternator makes electricity. Sending that electricity to the grid is still a standard use of the gas, beside upgrading it or liquefying it.
The gas is not fed to the engine as it leaves the digester. Hydrogen sulfide is removed first. Palm-effluent biogas carries sulfide at levels an engine and its oil will not tolerate. Water is knocked out of the gas on the way to the engine.
The generator is synchronous. It locks to the grid frequency and can export. It is rotating plant, as a steam turbine is, and it is not an inverter. Solar on the same site does not do this job. The connection voltage is the one the local grid requires. Where the site itself is large enough to need a high-voltage network, that network is the site distribution, not a part of the genset.
The engine does not turn all of the energy in the gas into electricity. Heat leaves in the jacket water and the exhaust. That heat can be used on the site. The product of this step is the exported power.