Place a small pot over medium-high heat and melt butter.
Add garlic, shallots, thyme, and broccoli and sauté for 3 to 4 minutes.
Stir in stock and turn heat down to simmer. Simmer mixture until most of the liquid has evaporated.
Toss the shredded cheese with the lemon juice and set aside.
Lower the stovetop heat to low and begin adding the cheese, 2 ounces at a time (stirring constantly with a wooden spoon).
Once all the cheese has been added, continue to stir until the mixture is smooth. Lightly season with salt and pepper.
Transfer to a serving dish and top with cracked black pepper, if using.
Serve immediately with crostini or crackers.