We investigate transport of Cooper pairs through a double quantum dot in the Kondo regime and coupled to superconducting leads. Within the nonperturbative slave boson mean-field theory we evaluate the Josephson current for two different configurations, the double quantum dot coupled in parallel and in series to the leads. We find striking differences between these configurations in the supercurrent versus the ratio $t∕\ensuremath{\Gamma}$, where $t$ is the interdot coupling and $\ensuremath{\Gamma}$ is the coupling to the leads: the critical current ${I}_{c}$ decreases monotonously with $t∕\ensuremath{\Gamma}$ for the parallel configuration whereas ${I}_{c}$ exhibits a maximum at $t∕\ensuremath{\Gamma}=1$ in the serial case. These results demonstrate that a variation of the ratio $t∕\ensuremath{\Gamma}$ enables one to control the flow of supercurrent through the Kondo resonance of the double quantum dot.