Shrines are for Shinto and temples are for Buddhism. Japan's indigenous religion Shinto is originating from the nonliterate Jomon period. So, it has no founder and no scripture. A shrine always has a torii gate, but a temple does not. This is the simplest visual difference.