In this paper we study inverse problems of electric conductivity that arise in the design of spherical shielding or cloaking shells and other functional devices used to control static electric fields. The shells are considered consisting of a finite number of layers filled with homogeneous isotropic or anisotropic medium. The inverse problems under study are reduced to control problems with the layers electric conductivities taken as controls. A different choice of minimized functionals allows us to solve a wide range of design problems using one approach. A numerical algorithm to solve these problems is based on particle swarm optimization. Various results of numerical experiments are discussed in order to find the most effective designs. The findings obtained in this study describe a broad set of specific easy-to-manufacture structures that have the highest cloaking or shielding performance in the class of layered shells.