How do gauginos and scalars gain masses after gauge-mediated symmetry breaking? In the minimal-GMSB model, the messenger fields transform under the MSSM gauge group and connect a so-called hidden sector to the visible sector. These meesenger fields (left-handed chiral supermultiplets in this case) break SUSY and introduce the soft terms in the MSSM. I do not understand how to integrate out these fields in the superspace formalism. How do the gauginos and scalars in the MSSM gain masses? The superpotential was,
$W= W_{breaking} + W_{mess} + W_{MSSM}$ , 
$W_{mess} = y_{l}Sl\bar{l} + y_{q}Sq\bar{q}.$
I do not see a coupling between the MSSM fields and the messenger fields. It happens by 1-loop and 2-loop contribution is what every book says but I am unable to see this. Can someone point out a reference if not a direct explanation of how to integrate out the messenger fields?
 A: A partial answer:

"I do not see a coupling between the MSSM fields and the messenger
  fields"

There are gauge interactions between observable and messenger fields.
Let us discuss with fig $(1)$ page $11$ of this reference.
You have not direct interactions between observable sector gauginos ($\lambda$) and s-fermions ($\tilde f$), and the superfield $X$ (your $S$) (see paragraph $2.1$, $2.2$)
However, you have, for instance, interactions between observable gauge bosons with $2$ fermionic or $2$ scalar components of the messenger fields $\phi$ (your $q,l$), interactions between observable gauginos and $1$ scalar +$1$ fermionic components of $\phi$, etc...
So, your messenger fields are necessarily charged under the observable gauge/gauginos sector.  
Now, the messenger fields $\phi$  interact too with the superfield $X$ (a $X\phi\phi$ interaction), so a Feynman diagram involving $X$, for instance for the first diagram of the fig $(1)$ would add 2 loops to the diagram, replacing each branch $\phi$, by a sub -branch $\phi$ + a loop $\phi X$ + a sub-branch $\phi$.
You would have to calculate this Feynman diagrams involving $X$, and working at energies $<< M$, where $M$ is a mass-scale (of the messengers) - due to the symmetry breaking -  given by the v.e.v. of some components of $X$, then use renormalization techiques, being interested only by terms not suppressed by powers of $M$. You are interested in an effective theory, so you are working at supersymmetric breaking energies $<<M$, this means that you may "integrate out" the degrees of freedom of the messengers (because there is not enough energy to create a real messenger particle).
The detailed whole process is beyond my skills, but I think that this is the idea.
