Melt the butter in a large pan.
Cut the onions into rings on a mandolin. Season with salt and pepper and drag through the flour.
Put the onions into a pot and return to low heat. Stir frequently to allow the butter and flour to mix well.
Add the stock once the mixture has thickened and the onions start to caramelise.
Leave to cook over low heat until the soup has thickened, continuing to stir regularly.
Taste, and add seasoning if desired. Continue adding new stock to the soup to prevent it from sticking to the bottom of the pot.