A shrine is a place dedicated to a holy person or a deity. A shrine can be a small, wayside marker like in the picture, or a large and elaborate temple.
A temple is a place that people go to serve or worship a deity or deities. Temples tend to have a distinctive shape according to the religion of the people who built the temple.