Deciding efficiently the emptiness of a real algebraic set defined by a single equation is a fundamental problem of computational real algebraic geometry. We propose an algorithm for this test. We find, when the algebraic set is non empty, at least one point on each semialgebraically connected component. The problem is reduced to deciding the existence of real critical points of the distance function and computing them.