Melt the butter in a saucepan, add the onion and fry until it is softened but not browned. Add the mushrooms and garlic and continue frying. The mushrooms will give off some liquid, so keep frying for a further 10 minutes or so, until the liquid is absorbed back into the mixture.
Add the sherry to the pan, increase the heat and bring to the boil t