Toast the hazelnuts in the oven over very moderate heat for a few minutes and then pass them through an almond grinder.
Crumble the cookies.
Prepare a cream by beating the sugar with the 2 egg yolks and butter.
Combine the cocoa and stir in the cookies and hazelnuts to this cream.
Place in a shallow, preferably square mold and then refrigerate for a few hours.
Serve it cut into diamond shapes.
Notes
For a lighter version, you can replace the butter with Greek yogurt and reduce the amount of sugar. Also, for a crunchy touch, add whole hazelnuts at the end.