The influence of plasma elongation and Shafranov shift on the stability of electrostatic ion-temperature-gradient driven modes (ηi-modes) is investigated. An advanced fluid model is used for the ions together with Boltzmann distributed electrons. The derived eigenvalue equation is solved both analytically, in the strong ballooning limit, and numerically. It is found that the effects of elongation change from stabilizing, for peaked density profiles, to destabilizing in the flat density regime. In addition, it is shown that the maximum growth rate is shifted towards shorter wavelengths as the elongation increases. The effects of shaping on tokamak stability are exemplified with data from a Joint European Torus (JET) high-performance mode discharge.