In this paper, we deal with the problem of obtaining a state feedback controller for polynomial dynamical systems such that the resulting closed-loop system will have a prescribed vector field on a given algebraic set. The problem relates to the realization of a prescribed stable limit cycle and the path following control. A procedure for solving the problem is provided such that all the polynomial state feedback controllers required in the problem can be represented by using free polynomial parameters. The free parameters can be utilized to specify the dynamics of the resulting closed-loop system outside the algebraic set.