Mechanically, there's almost nothing you can do. His boxes block your skillshots, his E is point-and-click, he dodges your cc with his ult, and escapes with his Q. The way you stop Shaco is to be smarter than him. It sounds condescending, but it's honestly the best way to keep Shaco from getting ahead.
For starters, never assume Shaco will take a predictable gank path. Ward as though you were warding against a Zac: deep into the river, over walls instead of in bushes, and always be wary of lane ganks if you're pushed.
As a Shaco main, one of the things I absolutely hate is laners who place pinks in the middle of their lane. It sounds unorthodox, but as long as you can protect it through proper minion wave management, Shaco can't touch you. A pink in the middle of your lane renders you all but immune to a Shaco gank from ANY direction. A pink in a river bush might protect you from one gank, but after that it will get destroyed by the jungler and Shaco will be back in about 30 seconds. Place your pink in the lane slightly behind your minions, then freeze the wave as best you can to prevent their top laner from getting to it. You can even place it in the middle lane bush to keep it safer (though this will require you to hug that bush closely for it to have an effect). This strategy has gotten a lot easier now that pinks have 5 HP and regenerate if not attacked.
Other than that, the main thing is just to stop him from snowballing. This means you MUST play safe during the first ~10 minutes of the game; don't trade with your laner as much, focus on farming, and adopt a passive stance in lane. Be extremely careful about pushing the lane. Freeze the wave near your tower if you can. Shaco cannot reliably tower dive pre-6.
And for the love of god, DON'T stay in lane when you're low HP. If you've just killed your laner and are at 100-200 HP, back the hell off instead of sticking around to get some farm. Those minions are not worth your life. There are so many times when I've been able to pick up free kills as Shaco simply by catching out careless laners who don't back when they should. This is what gets Shaco fed and snowballing. Ideally you would call your own jungler to collect the gold/XP while you retreat to safety, but if it comes down to it, just leave the lane. As long as Shaco isn't given anything easy, he won't be much of a threat later on.