Here's a simple definition that may help:
Coast = a contrast to the whole land mass
Shore = a contrast to the sea.
So even though these words may refer to the same location, you are looking at it from two different perspectives. Here are some examples:
"Did they find the lost boat out at sea?"
"No, it had washed up on the shore by the time they found it."
"Where do you live on the island?"
"We used to have a house on the coast, but now we live about 10 miles inland."