If $U$ and $V$ are vector spaces over some field $k$ and $U$ is finite dimensional with basis $\{u_i\}_i$, then we know that $\def\Hom{\operatorname{Hom}}$
$$\Hom_k(U, V) \to U^* \otimes_k V,\quad f \mapsto \sum_i u^* \otimes f(u)$$
is an isomorphism, where $U^* = \Hom_k(U, k)$. Does there exist a similar statement if $A$ is a $k$-algebra and $M$ and $N$ are $A$-modules such that $M$ is finite dimensional over $k$ with basis $\{m_i\}$? The obvious map
$$\Hom_A(M, N) \to M^* \otimes_A N,\quad f \mapsto \sum_i m_i^* \otimes f(m)$$
does not work, because if $A$ is finite dimensional with basis $\{a_i\}$, then
$$\Hom_A(A, N) \to A^* \otimes_A N,\quad f \mapsto \sum_i a_i^* \otimes f(a) = \sum_i a_i^* \otimes a f(1) = \sum_i a_i^* a \otimes f(1) = (\dim_k A) (1^* \otimes f(1)).$$
But even if one adds an additional factor of $(\dim_k A)^{-1}$, it does not seem to work. In particular, this would give an isomorphism
$$A \otimes_A N \cong N \cong \Hom_A(A, N) \cong A^* \otimes_A N,$$
which seems ridiculous. What's the correct way to go?