Preventing food poisoning involves practising food safety measures, such as washing hands and cooking utensils, storing food at safe temperatures and avoiding undercooked or contaminated foods. Proper food handling can significantly reduce the risk of foodborne illnesses that lead to stomach pain.