In a sturdy 1-quart saucepan, heat butter or oil over medium heat. Add the shallot and cook, stirring occasionally, until softened, about 3 minutes. Add garlic, if using, and stir until fragrant, 1 minute. Add the rice, season with salt and pepper, and stir until coated in oil and lightly toasted, 1 to 2 minutes.
Add stock and bring to a boil over high heat.
If your saucepan is ovenproof, cover it and bake until almost all the liquid is absorbed and the rice is tender, about 20 minutes.
If your saucepan is thin or is not ovenproof, tip everything out into the casserole dish, cover it and bake until almost all the liquid is absorbed and the rice is tender,. This might take a bit longer, as the casserole will start out cold. Begin checking at 20 minutes.
When the rice is tender, remove from the oven. Stir in the frozen peas and any other additions you'd like (up to 1 cup of fresh spinach, for instance).
Adjust seasonings and serve while hot.
Notes
Variations: you might want to add grated Parmesan, or a squeeze of lemon juice, or a pat of butter just before serving. For pesto risotto, stir in a heaping spoonful of pesto. For saffron risotto, add a pinch of saffron with the chicken stock. For a green version, add 2-3 chard leaves, finely shredded, to the rice just before the stock goes in.