Technique
Let freshly pulled espresso cool just long enough that it will not immediately melt the shaking ice, then shake very hard with plenty of solid ice. Double-strain into a chilled glass promptly so the foam settles evenly across the surface.
An espresso martini is a cold caffeinated alcoholic drink made with vodka, espresso coffee, coffee liqueur, and sugar syrup.

TonicDB editorial guide
An Espresso Martini needs both coffee concentration and vigorous aeration. Espresso supplies roasted bitterness, coffee liqueur and syrup provide sweetness, and shaking traps tiny bubbles and coffee oils to form the characteristic crema-like cap.
Let freshly pulled espresso cool just long enough that it will not immediately melt the shaking ice, then shake very hard with plenty of solid ice. Double-strain into a chilled glass promptly so the foam settles evenly across the surface.
Use a chilled coupe or martini glass and place exactly three coffee beans on the foam. The drink is best immediately, while the head is stable, the coffee aroma is fresh, and the liquid beneath it remains cold.
Weak coffee produces color without enough flavor, while hot espresso can over-dilute the drink before the shake is finished. A timid shake leaves little foam; too much syrup can make the coffee liqueur and espresso taste indistinct.
Adjust the syrup to the coffee and liqueur rather than treating half an ounce as mandatory. A sweeter liqueur may need only a quarter ounce; a dark, unsweetened espresso may need the full measure. Decaf espresso works with the same technique.
These notes explain how to execute and adapt the recipe shown above. Ingredients and serving traditions vary, so taste and adjust thoughtfully.
Contributed by @alfg