Heat a little oil in a frying pan and sauté the mushrooms with the thyme and rosemary over a fairly high heat. Remove from the pan and transfer to a plate.
In the same pan, melt the butter and brown. Add the chopped shallot and garlic and sauté gently. Then add the flour all at once and mix well. Cook gently for a few minutes, stirring constantly. Then add the mushroom stock in 3 parts, making sure it is well absorbed before adding the next part.
Stir in the mushrooms and tarragon and season with salt and pepper.
Bake the puff pastry shells according to the instructions on the package.