The Green function ##D(\vec{x},\vec{x}')## is the solution of
$$\Delta D(\vec{x},\vec{x}')=-\delta^{(3)}(\vec{x}-\vec{x}').$$
It's the solution for a point source of charge 1 subject to the boundary conditions of the problem, i.e., for you case you get it by putting a unit charge somewhere inside the sphere at ##\vec{x}'## with ##|\vec{x}'|<R##.
Now I suppose the shell is grounded. Then you have to simply find the solution subject to the boundary condition
$$D(\vec{x},\vec{x}')|_{|\vec{x}|=R}=0.$$
For the field inside the sphere, i.e., for ##|\vec{x}|<R## you can put an image charge ##q''## at ##\vec{x}''## with ##|\vec{x}''|>R##. You have to adjust ##\vec{x}''## and ##q''## such that the boundary condition is fulfilled.
For the field outside the sphere, i.e., for ##|\vec{x}|>R## everywhere ##\Delta D=0## must hold with the sphere as equipotential surface. This can only be the Coulomb field with the unit charge in the origin.
Now you get the field for the line charge by
$$\vec{E}(\vec{x})=\int_0^{R/2} \mathrm{d} z' \lambda D(\vec{x},z' \vec{e}_z).$$