Actually, it was his friend that was asking him for advice. So really, it WASN'T Shaggy. Though if Shaggy thinks to give that advice, and said friend comes to Shaggy for advice, then most likely at some point in the past, it WAS Shaggy. 

So, uh, good work, detective.