Sonic is famously known as "the fastest thing alive," so the answer to whether Shadow could beat him in a race is a matter of some debate.
While Shadow is incredibly fast and a worthy rival, Sonic's whole identity is built around his unmatched speed. In most fans' eyes, that title gives Sonic the edge, though a close race between the two would certainly be a thrill to watch.