To prevent electrical shock when cooking, always use dry hands, keep appliances away from water, and unplug them when not in use. Ensure cords are in good condition and use GFCI outlets. Avoid using metal utensils or touching hot surfaces near electrical sources.