Heat oil in large skillet over medium heat. Add shallots to the pan and cook, stirring frequently, until they are soft but not yet browned.
Add the mushrooms to the pan and cook until they become tender and their liquid evaporates, about 8 minutes.
Meanwhile, bring a large pot of salted water to a boil. Cook pasta according to package instruction. Drain, reserving ½ cup hot pasta water.
Stir in garlic, thyme, red pepper flakes, tomato paste, vinegar and butter to the mushrooms. Add ¼ cup of the reserved hot pasta water to the pan. Cook and stir until the mixture becomes saucy about 10 minutes. Add the hot pasta to the pan and toss gently to coat. Add more hot pasta water to the pan for desired consistency.