In this paper, we consider the heat transfer from a periodic array of isothermal pipes embedded in a rectangular slab. The upper surface of the slab is sustained at a constant temperature while the lower surface is insulated. The particular configuration is a classical heat conduction problem with a wide range of practical applications. We consider both the classical problem, i.e., estimating the shape factor of a given configuration, and the inverse problem, i.e., calculating the optimum shape that maximizes the heat transfer rate associated with a set of geometrical constraints. The way the present formulation differs from previous formulations is that: (i) the array of pipes does not have to be placed at the midsection of the slab and (ii) we have included an isoperimetric constraint (not changing in perimeter) through which we can control the deviation of the optimum shape from that of a circle. This is very important considering that most of the applications deal with buried pipes and a realistic shape is a practical necessity. The isoperimetric constraint is included through the isoperimetric quotient (IQ), which is the ratio between the area and the perimeter of a closed curve.