Some time before the Fifth Holy Grail War, but after Kiritsugu died (and also after the BAR), a mad Philosopher experiments on Shirou, and several other people in Fuyuki who he thinks won't be missed (by anyone who can stop him), transplanting Magic Circuits from others who won't be missed, into them, and teaching any survivors how to open those circuits (as opposed to what Shirou was doing in canon, turning his nerves into temporary circuits). What the point of the experiment is, I'm not so clear on, but perhaps the Philosopher is altering the circuits in some way, either before removing them from the host, or while transplanting them, so that they carry affinities, have better quality (daniel_gudman's suggestion), or some other such thing. How well it works is another matter.
Shirou is one of the survivors, possibly the only one, and while not the most powerful Master in the upcoming War, he is now far from the weakest, and may well know who some other the other magi in Fuyuki are.
If Matou Shinji was used (I could see Zouken renting him out, to see if it made him useful), I suggest that he did not survive. Ayako might be one of the survivors, though, and Taiga with magecraft could be interesting.
I suggest that the Philosopher be dead by the time the Fifth War starts, possibly killed by Shirou, when he finds out about all the people who've been crippled or killed by this nut. A Shirou who has already killed a person, would behave rather differently from the boy he was in canon, no?
On TFF, nick012000 pointed out that Rin would not take the Philosopher's actions particularly well, and thus might be the one to rescue the survivors, and/or kill the Philosopher. He also suggested Taiga and Ayako learning Reinforcement from Shirou, before the escape, but that depends on whether the Philosopher allowed them to interact, and how long it would take them to learn Reinforcement to a useful level.
So, thoughts?