The aim of this article is to solve the optimal shape design problem governed by a parabolic control system, defined according to a pair of geometric elements, the domain and its boundary, by embedding method. First, the classical form of the parabolic equation together with the boundary and the initial conditions are presented by integral equalities. Then, in a new formulation, the problem is shown as a minimization of a function on a set of positive Radon measures. By applying the suitable approximations and discretization on the appropriate spaces, this problem is also transferred to a finite linear programming one. In this manner, the solution can determine the optimal domain and optimal control at the same time. Based on this method, some numerical examples are also presented.