Preheat the oven to 350°F.
In a large mixing bowl, cream together the butter and the sugar.
Add the vanilla extract, egg, and espresso powder. Stir to combine.
Mix in the salt and baking powder, followed by the cocoa powder and flour.
Fold in the chopped chocolate if using. The dough should be thick but not crumbling.
Form the dough into a log approximately 9 x 2 x ¾ inches. Round and smooth the edges.
Bake the log of dough at 350°F for 25 minutes, or until it is fully set and forms a thin crust.
Remove the loaf from the oven and set aside to cool for about 5 minutes. Reduce the heat in the oven to 325°F.
Transfer the biscotti loaf to a cutting board and slice to form ½-inch thick biscotti. Place the biscotti back onto the baking tray with one cut side up.
Return the biscotti to the oven and bake for another 25 minutes, or until the biscotti are dry and crisp.
Allow the biscotti to cool, dip them in chocolate if desired, and enjoy!