Heat the oil in a pan and fry the thinly sliced onions. Add the minced ham, and fry for about 10 minutes.
Add the rice and the stock, then boil until the rice absorbs the stock. Stir regularly so that the rice does not burn.
Cool and then form into small balls.
Stuff each ball with a small amount of mozzarella, and reshape the balls. Beat the eggs. Roll the balls in the eggs and then coat in the breadcrumbs. Deep fry the balls in oil.
Before serving, sprinkle them with finely grated parmesan.
Roast the pine nuts on a frying pan without any fat.
In a pestle or bowl, crush the chopped garlic, torn basil leaves and the pine nuts together until smooth and creamy. Add the parmesan and olive oil, and pound them together.
Put the pesto in a jar.
Serve the arancini balls with the pesto. They pair perfectly with your favourite grilled vegetables.