Heat 1 tablespoon of the olive oil over medium heat in a large casserole or saucepan with a lid.
Gently sauté the onion or shallot until it begins to soften.
Grate in the garlic, and the chili (if using) and cook for a minute or so.
Turn up the heat a little and stir in the pearl barley, mixing it well with the oil, onion and garlic.
Cook for about a minute, stirring constantly.
Pour in the stock all at once and add the basil, oregano and some salt and pepper.
Bring the orzotto to the boil, stirring constantly so it doesn't stick. Then lower the heat to a simmer and pop a lid on the pan.
You will be cooking the orzotto for about 40 minutes, so give it a stir every 8 to 10 minutes.
After the orzotto has been cooking for about 20 minutes, heat the remaining tablespoon of oil in another saucepan.
Sauté the mushrooms gently for about 8 to 10 minutes.
Add the mushrooms to the orzotto. If all the stock has been absorbed at this point, and the barley is not yet tender, add one or two tablespoons of stock or boiling water.
Turn the heat to low and cook for another 10 minutes with the mushrooms, stirring once or twice.
Taste (be careful, it's really hot!) and add a bit more salt and pepper if you like.
Serve garnished with fresh basil or parsleyl, if you have some on hand. Otherwise a bit of dried parsley will do nicely.