Soak the pinto beans in cold water for 10 hours (ideally leave them soaked overnight). Rinse them well and drain.
Have the ingredients well washed and prepared as indicated in the ingredients description.
Heat the olive oil in a large saucepan. Add the garlic and sauté for 1 minute until lightly golden. Add then the onion, the red pepper and a pinch of salt and sauté for 2 more minutes until only lightly golden. Add then the potato and sauté over medium heat for around 7 minutes.
Reduce heat to low. Add the tomatoes, the drained pinto beans and stir. Cover with cold water and leave to cook, covered with a lid, at a medium-low heat for approximately 50 minutes or until the beans are almost done, stirring from time to time. Add a tablespoon salt (or salt to taste) and stir.
Add the rice and cook until the rice is done, preferably al dente. Remove from the heat and serve hot.