Given a (not necessarily finite) ring map $f : A \to B$, the $B$-module $M$ can be considered as a module over $A$. If $M$ is finite, this method returns the corresponding $A$-module.
i1 : kk = QQ;
i2 : A = kk[t];
i3 : B = kk[x,y]/(x*y);
i4 : use B;
i5 : i = ideal(x)
o5 = ideal x
o5 : Ideal of B
i6 : f = map(B,A,{x})
o6 = map (B, A, {x})
o6 : RingMap B <-- A