I'm reading Introduction to representation theory by Etingof et al. and I'm struggling with one statement in the proof of Theorem 2.6. (representations of direct sums of matrix algebras), namely $$ (A^n)^*\simeq A^n, $$ where both sides are considered as representations of $A=\bigoplus_i\textrm{Mat}_{d_i}k$, $k$ is any field. As far as I understand, $(A^n)^*$ is a representation of $A^{op}$ (by definition of the dual representation) and $A^{op}\simeq A$ in our case. Thus, we need to construct isomorphism $\varphi$ of vector spaces $(A^n)^*$ and $A^n$ such that for all $a\in A$ and $f\in (A^n)^*$ we have $$ \varphi(f\circ\rho(a))=\rho(a)(\varphi(f)), $$ where $\rho(a)$ is corresponding element of $\textrm{End} A^n$.
Isomorphism between $W^*$ and $W$ (as vector spaces) is usually defined as $\varphi(f):=\sum_i f(e_i)\cdot e_i$, where $\{e_i\}$ is an arbitary basis in $W$. However, here we can't apply it here, I think (at least I don't understand how to satisfy the mentioned condition for $\varphi$).
It's not clear for me how such $\varphi$ might be constructed. Any help would be appreciated.