Field theory of finite-size effects in Ising-like systems