$\newcommand\la\lambda$If $X_1,X_2,\dots$ are iid random variables (r.v.'s) each with the exponential distribution $E(\la)$ with parameter $\la$, [then][1]
$\sum_1^n X_i\sim E(k,\la)$. 

In turn, if $U_1,U_2,\dots$ are iid r.v.'s each with the uniform distribution over the interval $(0,1)$, then the r.v.'s $X_i:=-\dfrac1\la\,\ln U_i$ will be iid, each with the exponential distribution $E(\la)$. So, 
$$-\frac1\la\, \ln \prod_{i=1}^k U_i
=\sum_{i=1}^k\Big(-\frac1\la\, \ln U_i\Big)
=\sum_{i=1}^k X_i
\sim E(k, \lambda),$$
as desired.



  [1]: https://en.wikipedia.org/wiki/Erlang_distribution#Related_distributions