Apparently the media has the power to dub Emperors, so I imagine Shanks beat a couple of big shot pirates in his day and amassed enough territory to be considered an equal to the legendary figures of White Beard, Big Mom and Kaidō.
I wouldn’t be surprised if Shiki was a Yonkō and lost the title when he was imprisoned or if there was another legendary pirate that had the title of Yonkō before Shanks took it.