To make the refried beans, heat the oil in a large frying pan over a medium–low heat, add the onion and cook, stirring often, for 7–10 minutes, until the onion starts to turn golden.