Put a drizzle of extra virgin olive oil in a frying pan, turn on the heat and toast the rice for a few minutes. Add the vegetable stock or water a little at a time and cook. Keep adding it until the rice is ready. Turn off the heat and add the grated Parmesan cheese, a good knob of butter and a pinch of salt. Stir well and let it cool.
Take a frying pan (about 20-22cm in diameter), put it on the stove and pour in a little bit of oil. Then add half of the rice, pressing very well to compact it.
Lay slices of cooked ham on top and then slices of fontina cheese to cover the surface, leaving some of the edge uncovered. Cover with the remaining rice, again compacting it.
Let it cook for about 10 minutes; the base should become crisp and golden brown.
Helping yourself with a lightly oiled lid, turn the flan over, resting it on top, to the other side.
Let it cook continuously for about 10 minutes. Turn off the heat, transfer to a serving plate and serve.