We consider Poisson's equation on the unit square with a nonlocal boundary condition. The existence and uniqueness of its weak solution in Sobolev space $H^1$ is proved. Afinite difference scheme approximating this problem is proposed. An error estimate compatible with the smoothness of input data in discrete $H^1$ Sobolev norm is obtained.