In this article, a novel method has been proposed to optimize the electromagnetic shielding rooms. This method is based on using minimum electromagnetic absorbing materials on the inner surface of the rooms. The positions of the absorbing materials are found optimally to produce a ''best'' performance for the shielding rooms. The ray-tracing method is used to predict the shielding effectiveness (SE) of the electromagnetic shielding rooms with apertures. The performance of the proposed method is verified by a comprehensive example.