To control the shape of the ultra-thin electron layer produced by directly interaction of ultrahigh contrast laser with ultra-thin foil target, we investigated the spacial distribution and temporal evolution of electron layers produced from single and double foil targets through two-dimensional particle-in-cell simulations. Results show that electron layers produced from double foil targets can fly with unperturbed velocity for a much longer time than in the single foil case, which can be explained by the integrated contribution of charge separation field from both the two foils. Further studies show that through adjusting the foil expansion, electron layers with different shapes can be obtained. Detailed studies on the forming process of layers show that electron momentum distribution evolves rapidly along with the pump laser and then the vanishing of electron transverse momentum induced by the reflected laser results in the forming of layer shape. So different foil expansion corresponds to different moments that reflected laser interact with electron layer, when the electron transverse momentum distribution is different. After the reflected laser interact with electron layer, the resultant longitude momentum distribution will finally lead to various electron layer shapes.