Electron correlations in two dimensions: effects of finite thickness and image charges