Melt butter in a medium skillet over medium heat. Cook mushrooms until browned and slightly charred. Transfer mushrooms to blender, but don't blend yet.
With the pan still on medium heat, cook garlic and shallots in remaining butter until slightly soft and translucent, about 60 seconds. Add the flour and stir until cooked, about a minute. Then add the marsala wine and stock, stirring to scrape browned bits off the bottom of the pan. Add ¼ tsp salt and a few grinds of pepper, stirring to combine.
Bring to a boil, stirring constantly, until the mixture has reduced and thickened slightly. Then add liquid to the mushrooms in the blender.
Blend liquid and mushrooms until smooth. Season with additional salt and pepper to taste, if necessary.