In this article, we discuss a least-squares/fictitious domain method for the solution of linear elliptic boundary value problems with Robin boundary conditions. Let Ω and ω be two bounded domains of Rd such that ω̅⊂Ω. For a linear elliptic problem in Ω\ω̅ with Robin boundary condition on the boundary ϒ of ω, our goal here is to develop a fictitious domain method where one solves a variant of the original problem on the full Ω, followed by a well-chosen correction over ω. This method is of the virtual control type and relies on a least-squares formulation making the problem solvable by a conjugate gradient algorithm operating in a well chosen control space. Numerical results obtained when applying our method to the solution of two-dimensional elliptic and parabolic problems are given; they suggest optimal order of convergence.