We develop an approach to treat magnetic energy of a ferromagnet for arbitrary curved wires and shells on the assumption that the anisotropy contribution much exceeds the dipolar and other weak interactions. We show that the curvature induces two effective magnetic interactions: effective magnetic anisotropy and effective Dzyaloshinskii-like interaction. We derive an equation of magnetisation dynamics and propose a general static solution for the limit case of strong anisotropy. To illustrate our approach we consider the magnetisation structure in a ring wire and a cone surface: ground states in both systems essentially depend on the curvature excluding strictly tangential solutions even in the case of strong anisotropy. We derive also the spectrum of spin waves in such systems.