In a heavy based saucepan melt the butter.
Slice the pancetta into very thin strips and fry these with the rosemary for about 10 minutes.
In another saucepan bring the chicken stock to a boil and keep it simmering.
Cut the chestnuts into rough pieces and add the pancetta. Stir for 1-2 minutes, then add the rice and stir for a minute. Then start adding the hot soup, only a ladleful at the time - when the stock has absorbed, add the next portion. Keep stirring.
When you've used up the stock, pour in the milk and cook for about 15 minutes - while occasionally stirring. Turn off the heat under the stock pan!
When the milk has absorbed, taste it. The rice should be al dente, the chestnuts should be soft. Stir in the beans. Sprinkle with the grated parmesan just before serving.