Into a medium-size skillet over medium-high heat, add the olive oil. When the oil is hot, add the mushrooms and shallots. Season with salt and pepper. Cook for 5 minutes, stirring frequently until softened.
Pour in the Marsala wine and continue cooking for an additional 2 minutes, until most of the liquid has evaporated.
Add the beef-style broth and rosemary, then whisk in the flour until fully incorporated.
Bring the mixture to a boil then reduce the heat to low. Simmer for 10 minutes, stirring occasionally until thickened slightly.
Remove from heat and add the butter, stirring until it is melted into the gravy.
Adjust the seasoning to taste with salt and pepper and serve hot.