A war on food waste in France, where supermarkets are banned from throwing away unsold food and restaurants must provide doggy bags when asked, has helped it secure the top spot in a ranking of countries by their food sustainability.

Japan, Germany, Spain and Sweden rounded out the top five in an index published by the Economist Intelligence Unit (EIU), which graded 34 nations based on food waste, environmentally friendly agriculture and quality nutrition.

It is "unethical and immoral" to waste resources when hundreds of millions go hungry across the world, Vytenis Andriukaitis, EU Commissioner for Health and Food Safety, said at the launch of the Food Sustainability Index 2017 on Tuesday.