Let $\mathbb{K}$ be a field and $a,b\in M_2(\mathbb{K})$.
We define the map \begin{equation*}\phi_{(a,b)}:M_2(\mathbb{K})\rightarrow M_2(\mathbb{K}), \ m\mapsto amb\end{equation*} Let $\mathcal{E}$ be the standard basis of $M_2(\mathbb{K})$.
That means that $$\mathcal{E}=\left \{\begin{pmatrix}1 & 0 \\ 0 & 0\end{pmatrix}, \begin{pmatrix}0 & 1 \\ 0 & 0\end{pmatrix}, \begin{pmatrix}0 & 0 \\ 1 & 0\end{pmatrix}, \ \begin{pmatrix}0 & 0 \\ 0 & 1\end{pmatrix}\right \}$$ right?
I want to calculate $M_{\mathcal{E}}(\phi(a,b))$.
We have that \begin{align*}&\phi_{(a,b)}(e_{11})=ae_{11}b \\ &\phi_{(a,b)}(e_{12})=ae_{12}b \\ &\phi_{(a,b)}(e_{21})=ae_{21}b \\ &\phi_{(a,b)}(e_{22})=ae_{22}b\end{align*}
Do we have to write the matrices in the form $\begin{pmatrix}a_{11} & a_{12} \\ a_{21} & a_{22}\end{pmatrix}$ and calculate these products? Or is there also an other way?
As far as direct calculation goes, especially in the context of a course in elementary linear algebra, your approach is really the most efficient way to proceed.
However, if you are interested in how this might be done more efficiently using established (albeit "advanced") results and techniques, we could quickly find the matrix of this map using the vectorization operator. In particular, the map $$ \Phi_{(a,b)}: \Bbb K^4 \to \Bbb K^4, \quad v \mapsto \operatorname{vec}(a\operatorname{vec}^{-1}(v)b) $$ represents the matrix of this linear operator relative to the "lexicographically ordered" or "column-major order" basis $\mathcal B = \{e_{11},e_{12},e_{21},e_{22}\}$. As you can read on the wiki page that I linked, the interplay between the Kronecker product and vectorization can be exploited to yield $$ \Phi_{(a,b)}(v) = \operatorname{vec}(a\operatorname{vec}^{-1}(v)b) = (b^T \otimes a)\operatorname{vec}(\operatorname{vec}^{-1}(v)) = (b^T \otimes a) v, $$ which is to say that the matrix of $\phi_{(a,b)}$ relative to $\mathcal B$ is given by $(b^T \otimes a)$.
We could apply similar reasoning to find that the matrix of $\phi_{(a,b)}$ relative to your "row-major" basis $\mathcal E$ is given by the reversed Kronecker product $a \otimes b^T$. Explicitly, this product is the block matrix $$ a \otimes b^T = \pmatrix{ a_{11}b^T & a_{12}b^T\\ a_{21}b^T & a_{22}b^T} $$