Heat the oil in a pan and bake the onion rings until golden brown. Add the garlic and peppers and, after 5 minutes, the tomatoes. Simmer everything on a low heat for 20 minutes, stirring occasionally.
In the meantime, clean the beans and blanch them in salted water for 8 minutes. Drain the beans and then add them to the pan. Salt and pepper everything. Cover the pan and simmer for another 5 minutes.