Given that the sequence of $\mathcal{S}$-measurable functions $\{f_k\}_{k\geq1}$ are non-negative, for each $f_k$, we can construct an increasing sequence of simple non-negative functions $\{f_{k_n}\}_{n\geq1}$ such that $\lim_{n\to\infty}f_{k_n}(x)=f_k(x)$ for all $x\in\,X$. Now, by the monotone convergent theorem, we have
$$\sum_{k=1}^{m}\int\,f_kd\mu=\lim_{n\to\infty}\sum_{k=1}^{m}\int\,f_{k_n}d\mu=\lim_{n\to\infty}\int\sum_{k=1}^{m}f_{k_n}d\mu=\int\sum_{k=1}^{m}f_{k}d\mu$$
As $m$ goes to infinity, we have