I'm not going to really focus on the Ninja stuff and address the Buddhism and it's relation to Shinto part of your post.
Shinto is a collection of beliefs that exist in Japan long before the term was around.
It goes back somewhat to Jomon and even Paleolithic times. And most likely comes from Siberia, in my opinion.
Then as time when on, China started coming over and establishing influence with Japan.
And gave them some nifty parts of their own culture, such as the writing system, Kanji, which Japan eventually short handed and gave some changes to. Much like how the Roman Cyril gave writing to the Slavic Russians. And with is came also religious influence, Taoism and Buddhism, especially Buddhism. At first the two were fairly separate, but as time went on, and many people practiced both, Buddhism, which had already strayed much from original Buddhism under Chinese influence, and Shinto, the two had fused together extremely heavily. And so now you will often see Buddhist advertisements include things such as the god Inari and Shintoist include such concepts and Buddhist ideas of the afterlife. Buddhism being heavily influenced by Chinese animism gave Shintoist who also believed in Buddhism several other gods to pay attention to, and Buddhists, to win over the folk believers, take on even more gods, Japanese ones, in the process.
Most if not all martial arts in Japan has some Chinese influence. Including Ninjutsu.
Ninja can be seen as basically like a older, Japanese version of our modern day Snipers, Special Ops soldiers, Spies, Assassins, and other more "darker" and "cool" operations that people often like to make movies about.
Solid Snake from Metal Gear Solid is essentially a "ninja". But so is the fictional character Naruto dressed in Orange.
And here I suppose is where the religion comparison can come in. The more "Naruto", "Wizard-like martial artists" aspect of the Ninja history. Indeed Hollywood style Ninjas are only a BS thing if you don't believe in the mythology. Because the legends essentially do say that ninja had "maho" or "magic" powers. An idea that can be attributed to the animism of Japan.
And for this, I bring out another Naruto related mention, Jiraiya. Jiraiya is NOT just a Naruto character, whether you believe in him or not, is up to your beliefs. But it's just as likely that he existed at most of the characters in the "Holy Bible". He was said to be a ninja who was able to wield powerful magic, to the point that he could morph into a toad. The same can be said of other Naruto characters, Tsunade, and Orochimaru.
And while doing deathly acts, these people, like the Samurai, were likely religious to some degree. Both the Ninja and Samurai seem to have some mentioned link to Buddhism.
But I must say, I know not more than that. And I must say I must surely assume some ninja had favorable attitudes to Shinto, not just Buddhism, as well.