To be a good Japanese nationalist, one should pay a visit to the local Shinto shrine occasionally and help to pacify the spirits of the dead soldiers, and to petition the kami (gods). Also, 'Shinto' as a category divorced from Buddhism is a recent development in Japan, so in a sense categorical 'Shinto' religion is rather new on the scene, but most of the practices are in fact the ancient indigenous religion of the people.
I am sorry to resurrect the thread, but I thought I would be remiss if I did not respond.
Shinto predates Buddhism in Japan. Buddhism is an Indian import by way of China, while Shinto is the indigenous animist religion. History notes some conflict between Buddhism and Shinto upon the former's arrival to Japan. Shinbutsu bunri (神仏分離) was not the birth of Shinto as a Buddhist offshoot.
The practices you describe of soldiers' spirits and Japanese nationalism describe State Shinto, a practice that arose in the late 19th century. Shinto itself is much more a system of practices regarding purity and cleanliness than a system of beliefs and dogma. The vast majority of Japanese would describe themselves as doing Shinto things rather than practicing Shinto. For example, I used to live rather close to Ise Shrine (one of Shinto's holiest) and now visit there with my beautiful young Japanese wife every year. It holds no religious significance to her or most of the other Japanese visitors who are there with us. Think of a nominal member of a religion who does religious things like weddings and funerals but does not practice their religion's precepts.
(You may find it surprising, but most Japanese do not wish to be a "good Japanese nationalist". Nationalism in Japan is associated with extreme right-wing political fanaticism. In the larger cities, one occasionally encounters a van or truck decked out with loud speakers while a nationalist shouts a diatribe. He is invariably regarded as nothing more than a curiosity to be watched for a minute before going about one's business.)
I think that "god" is not the best translation of "kami" (神), although while "spirit" is closer, it still misses the mark. Perhaps something like "spiritual essence", although that still feels clumsy. The rock has a kami, the wind, and the grass, but no one worships the wind or a pebble. Still, ritual is followed to (ostensibly) gain favor, although for most, again, I think it is going through the motions. I wash my hands before entering the shrine out of respect for the local practice, not because I wish to curry spiritual favor, and I am confident that most other visitors are of similar mindset.
As coincidence would have it, the first place I lived in Japan was Hakodate, St. Nicholas's first post in Japan. The Russian influence in the city remains to this day. I am only recently an orthodox inquirer, so I unfortunately did not make better use of my time in Hakodate. I will remedy that during my next visit to Hakodate.