Rare radiative decay $phitoetapi^0gamma$ was studied with SND detector at {VEPP-2M} electron-positron collider and its branching ratio was measured: $B(phitoetapi^0gamma)=(0.88pm0.14pm0.09)cdot 10^{-4}$. Significant contribution of the $a_0(980)gamma$ intermediate state was observed in the decay. The result is based on total integrated luminosity corresponding to $2cdot10^7$ produced $phi$ mesons.