This paper investigates the eigenmode optimization problem governed by the scalar Helmholtz equation in continuum system in which the computed eigenmode approaches the prescribed eigenmode in the whole domain. The first variation for the eigenmode optimization problem is evaluated by the quadratic penalty method, the adjoint variable method, and the formula based on sensitivity analysis. A penalty optimization algorithm is proposed, in which the density evolution is accomplished by introducing an artificial time term and solving an additional ordinary differential equation. The validity of the presented algorithm is confirmed by numerical results of the first and second eigenmode optimizations in 1D and 2D problems.