In the bowl of an electric mixer set on medium-high speed, cream the butter and sugar for 3 to 4 minutes, or until light and fluffy. Add the egg yolks one at a time, beating well after each addition and scraping down the sides of the bowl as needed. Beat in the vanilla.
Reduce the mixer speed to medium-low and add the flour in a few additions until incorporated. Scrape the dough from the bowl and gather it into a mass. Wrap in plastic wrap and refrigerate for at least one hour or as long as overnight.
Preheat the oven to 350 °F.
On a lightly floured surface, knead the chilled dough a few times to warm it up and make it pliable. With a floured rolling pin, roll it into a rectangle about 1/8-inch thick and 12 inches long. Using a small, sharp knife, cut the dough into the desired shapes. Lay on an ungreased baking sheet and prick the shortbread several times with a fork. Bake for about 12 minutes, or until lightly browned and firm.
Transfer to wire racks to cool.