French oil and gas company Total has purchased a 23% stake in renewables company Eren for €237.5 million ($284 million).