Add the mushrooms in a bowl or a measuring cup and cover with hot water.
Let soak about 30 minutes, until soft.
Line a strainer with cheesecloth and set it over a bowl.
Drain the mushrooms and squeeze them over the strainer.
Then rinse in several changes of water or under running water and coarsely chop.
Measure out 1/4 cup of the mushroom soaking liquid.
Heat a large pot of water for the pasta.
Add the oil in a large, wide, heavy nonstick frying pan over medium heat and stir in the shallots or onion.
Cook, stirring, until tender, 4 to 6 minutes.
Stir in the garlic and cook for 1 minute, until fragrant, then stir in the mushrooms and cook for another 1 to 2 minutes, until fragrant, stir constantly.
Pour in the tomatoes and their juice, the reserved 1/4 cup of mushroom soaking liquid, the thyme and 1/2 teaspoon salt.
Mix and turn up the heat.
When the tomatoes start bubbling, lower the heat to medium and cook, stirring often, until thick and fragrant, 18 to 20 minutes.
Stir in black pepper and salt and to taste. Keep warm.
When the pasta water comes to a boil, add a tablespoon of salt into the pasta.
Cook al dente, following the timing directions on the package but checking a minute or two before the suggested time is up.
Remove 1/4 cup of the pasta cooking water and stir into the mushroom sauce.
When the pasta is cooked through but still firm to the bite, remove another 1/2 cup water, drain the pasta and toss with the sauce in the frying pan if possible.
If you wish to thin out the sauce or moisten the pasta further, add a few tablespoons of the pasta cooking water or more of the mushroom soaking liquid.
Serve hot with some grated parmesan on top.