Add the butter to a pan and turn the heat to medium. Stir occasionally until the butter is browned, roughly 5 minutes.
Dice the onion.
Add the onion to the pan and cook until translucent.
Peel and mince the garlic cloves.
Add the garlic cloves to the pan and cook until fragrant, this should take less than a minute.
Add the shaved brussels sprouts, salt, pepper, and walnuts to the pan and stir. Cook until the brussels sprouts are cooked through, roughly 10 minutes.