It is rare that the issue of food safety is mentioned let alone included in current approaches to tackling food insecurity, yet 4.5 billion people are potentially exposed to a carcinogenic toxin – aflatoxin – through their diets. The toxin is responsible for up to 28% of liver cancers globally, and is linked to childhood stunting and suppression of the immune system, contributing to diseases such as TB.

Aflatoxin is one of a number of harmful toxins routinely consumed through contaminated food in developing countries. It is produced by a soil borne fungus, aspergillus, that grows on staples such as maize, rice and groundnuts. Contamination spreads along supply chains due to poor production and storage. Twin, an ethical trading organisation, is engaging with smallholder groundnut producers in Malawi to address the stringent health and safety regulations needed to import products to Europe. However, in countries like Malawi, 60% of groundnuts or other staples are bought and consumed in largely informal markets.

As a result of low awareness levels of the health impacts, smallholders lack the incentive to change their practices. Producer organisations such as the National Association of Smallholder Farmers of Malawi (Nasfam) are developing radio programmes, videos and articles to disseminate the dangers and causes of aflatoxin contamination, while promoting best practice in control, management and mitigation techniques. The global poverty action fund is also supporting this initiative by training farmers.

Consolata Mkowa, who attended training said: "At first, my goal was only centred on delivering my produce to the market regardless of the quality. I was putting other people's lives at risk. With the training received in aflatoxin, I am now making sure I dry and store my groundnuts in the appropriate way."

Food waste in the developing world primarily occurs at the farmer and producer end of the value chain. The Waste Not, Want Not report (2013) by Institution of Mechanical Engineers pinpoints the causes of this waste as deficiencies in infrastructure and the fact that crops are frequently being handled poorly and stored under unsuitable conditions.

While this is often referred to as waste, Twin's work in the groundnut sector suggests that very little crop is ever wasted. Even when aware of the dangers, smallholders and wider communities facing hunger may still consume unsafe food, resulting in long-term negative health impacts that can set back economic development for generations.

Twin supports an approach to food security that starts with the food already being produced. By improving drying, storage and primary processing infrastructure and building capacity, smallholders can reduce waste, plan for future production, and improve food safety and public health. For example, it is estimated that women in Africa spend 4bn hours hand shelling groundnuts each year. To ease this painful and arduous task, groundnuts are often soaked in water to soften the shell. Adding water creates the perfect conditions for fungal growth. The introduction of small hand operated mechanical shellers not only reduces the time spent shelling by up to 10 times, but also removes the need to soak the groundnuts.

Highly developed farming systems in countries such as the US and Argentina also experience problems with aflatoxin contamination, so this is not just a developing world issue. Even after adapting production and storage practices, there will remain a need to deal with contaminated food.

Food with the highest levels of contamination often ends up being eaten by the poorest and most vulnerable people. To address this, Twin has researched value chains that deliberately pull aflatoxin out of the human food chain by processing contaminated groundnuts to produce safe value-added products. A good example of this is processing groundnuts into nut oil, which filters out aflatoxin and results in a safe product in high demand. Further value can be added by treating the resulting waste product – groundnut cake – for use in animal feed.

Interventions designed to improve safety controls and contamination management and mitigation will go a long way to reducing exposure to toxins. However, many trading companies and processors will continue to sell contaminated food onto unregulated markets, rather than making a loss or investing in the necessary processing. One measure is the introduction of legal levels of toxins in food, but such regulations needs proper enforcement. Enforcement not only requires political will, but a sufficient capacity to affordably test food intended for human consumption. Organisations such as the Partnership for Aflatoxin Control for Africa (Paca) are working with the African Union and the Regional Economic Communities to harmonise food safety standards.

There isn't one silver bullet to solve these problems. Food safety issues are complex and driven by social, economical, political and environmental factors. Any solution therefore needs to be holistic and requires collaboration and co-operation between a diverse group of people.

Andrew Emmott is Twin senior manager (Nuts) and Andy Stephens is Twin project manager (Nuts)

This content is brought to you by Guardian Professional. To get more articles like this direct to your inbox, sign up free to become a member of the Global Development Professionals Network