Put the olive oil, shallots and a pinch of salt in a large (12-inch) skillet and place over medium heat. Cook, stirring frequently, until the shallots are softened, but not browned.
Add the mushrooms to the pan, Cook for about 5 minutes, or until they take on some color, then stir and add 1/2 teaspoon salt (this helps them release their water). Continue cooking until the mushrooms become tender and the liquid evaporates.
Stir in the garlic, rosemary or thyme, chili, tomato paste, vinegar and butter. Add 1/3 cup of the stock or water and stir until the mixture becomes saucy, adding more liquid if needed.
Serve the ragu over Parmesan Polenta with grated Parmesan.
Make ahead: The sauce will keep up to 5 days, refrigerated.