Solar energy has helped the European Union avoid more than €40 billion in gas imports in just seven and a half months, strengthening its energy security.