This is a recipe I got from TV but I've changed it to my liking. You can do the same by choosing any flavor preserves you'd like. Do not let the prep time throw you off; you must freeze the dough before baking.
Beat butter in a bowl with an electric mixer until light and fluffy. Add egg yolks to butter one at a time, blending well after each addition.
Mix flour, white sugar, baking powder, cardamom, and salt together in a bowl. Stir flour mixture into butter mixture until just combined. Divide dough in half and wrap each tightly in plastic wrap. Freeze for at least 3 hours.
Preheat oven to 350 degrees F (175 degrees C).
Grate 1 ball of frozen dough evenly into the bottom of a baking pan. Spread blackberry jam over grated dough, leaving 1/2-inch space around the edges. Grate the second ball of frozen dough over the jam.
Bake in the preheated oven until golden brown, 30 to 40 minutes. After shortbread cools, sprinkle with confectioner's sugar and cut into bars.