Using the concept of $\mathcal {I}$-convergence we provide a Korovkin type approximation theorem by means of positive linear operators defined on an appropriate weighted space given with any interval of the real line. We also study rates of convergence by means of the modulus of continuity and the elements of the Lipschitz class.