He didn't. Shadow was created by Gerald Robotnik — Professor Gerald Robotnik, Eggman's grandfather, aboard the Space Colony ARK.
The mix-up is understandable given the family resemblance and shared surname, but the credit for Shadow's creation belongs to the older Robotnik.