Yes eating espresso beans can give you caffeine.
The espresso beans do contain caffeine so when you eat those espresso beans you do get some caffeine intake.
Eating too many espresso beans could cause a caffeine overdose which could be harmful or even deadly.
But eating some espresso beans is okay and you do get some caffeine.
However you get more caffeine by drinking the espresso and it's much more delicious that way as well.
I've eaten coffee beans and espresso beans before but they are hard to chew and digest.
I prefer to drink the espresso drink or coffee made from them instead.