As a quick rule of thumb in Scotland, if you wander into a random fish and chip shop and there is a menu featuring deep fried pizzas or, heaven forbid, deep-fried Mars bars or burgers, then you are for sure in the wrong place. They obviously have no respect for food. There is almost certainly somewhere better nearby.
Research is key. @Duvelfound the seafood shacks, but I'm afraid missed some great fish and chips. A short distance from St. Andrews and on a pleasant route to Perth would have been to stop in here, one of the best F&C places in the UK. Check out their menu. That is what a proper F&C menu looks like. Yes, it has pizza, but they're not deep fried. I'd stick to the seafood, though.
And remember, everywhere has bad rip-off food.