How to make a proper espresso?

The problems are:
1) Not as bold as in restaurants or automatic coffee machines
2) (Almost) no foam

I used a plenty of roasts, grinds (both home and preliminary), dozes (from no-pressed to hard-pressed), but it still doesn’t look and taste like automatic machine espresso. Where did I possibly go wrong?