You have to announce it before your turn I believe (this was one of NF's abilities so I'm not 100%). In a real match they don't know what Shield bash does so it wouldn't matter if you tip them off. But in this case it could be a detriment, unfortunately.

This is where practice battles and the easy access you have to each others stats can be a bit of a pain

Also, Karifean, in a real battle it won't be announced that your SPD has been dropped by 20