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