Place a saucepan over a medium heat and add the butter. When the butter has melted, add the onions, cover and leave to sweat for about 10 minutes. Then remove the lid, turn up the heat and stir the onions until they become lovely and brown. Tip the onions into a bowl and leave to cool.
Roll dough to about 1/4 inch thick. Then brush the pizza base with some olive oil, spread the onions out all over the base, crumble the blue cheese on top, and sprinkle over the finely chopped rosemary. Season with salt and pepper, then place in the oven for 20 minutes.