Heat the extra-virgin olive oil in a frying pan over a medium heat.
Add the onion, rosemary and salt and pepper, to taste.
Cook the onions until sweet and soft, 8 to 10 minutes.
Stir in the tomato puree for 1 minute.
Add the stock, then stir in the beans and reduce the heat to low until the beans are cooked through.
Adjust the seasoning and turn the beans out into a serving bowl.
Keep warm until ready to serve.