Preheat oven to 325. In an oven safe Dutch Oven or pot with a lid (check that all knobs are oven safe) melt butter. Add the shallots and cook until soft, about 2 minutes.
Add the potatoes and cook until browned, about 5 minutes.
Remove from heat, pour beer over potatoes, add rosemary, pepper and salt. Cover with lid and place pot in the oven until potatoes are fork tender, about 18-20 minutes.
Remove from oven and return to stove. Using a slotted spoon, remove the potatoes and set aside.
Add the flour and stock, whisk over medium high heat until thickened, about 3 minutes. Serve potatoes with gravy.