Heat the oil in a flameproof casserole, add garlic and onion and fry until softened. Stir in rice, chilli, salt and pepper to taste. Cook, stirring, until rice is golden.
Add chorizo and mushrooms and mix well. Add enough hot stock to come 2cm above the rice. Stir thoroughly. Cover tightly and cook in oven for 30 minutes or until rice is tender and liquid absorbed.