Shinto's modern shape was made by government decisions, and they are worth stating precisely because the subject is politically contested.
Until 1868, kami and buddhas were served together. Shrines stood in temple grounds, Buddhist clergy conducted kami rites, and doctrines developed explaining kami as protectors of the Buddhist teaching or as its local manifestations. The Meiji government ordered them separated. Edicts from 1868 required shrines to expel Buddhist clergy, images and vocabulary, and the resulting haibutsu kishaku agitation destroyed a great deal of Buddhist property before the state pulled back in the 1870s. The separation was never completed, but it created the modern impression that Shinto and Buddhism are two distinct religions.
The state then organised shrines into a national ranking, appointed and paid priests at the higher grades, merged or closed thousands of small shrines, and defined shrine rites as non-religious civic observance. That definition mattered: it allowed the government to require attendance from schoolchildren, soldiers and colonial subjects in Korea and Taiwan while formally maintaining freedom of religion. The arrangement, usually called State Shinto, tied the shrines to the imperial institution and, in the 1930s and 1940s, to mobilisation for war.
The occupation dismantled it. The directive of 15 December 1945 ended public funding, official sponsorship and the teaching of State Shinto doctrine in schools. On 1 January 1946 the emperor issued a rescript that the Allied command presented as a renunciation of divinity; Japanese scholars have argued since that the wording says something narrower, and the reading is still disputed.
Yasukuni Shrine carries the unresolved part. It enshrines those who died in the service of the state, and in 1978 the names of fourteen men convicted as Class A war criminals were added. Visits by prime ministers and cabinet members draw formal protests from China and South Korea, are defended in Japan as private mourning and a matter of sovereignty, and are opposed by many Japanese as well. The dispute is live and this entry takes no side in it.