Firstly, there is nothing in law saying shoulder to shoulder is no foul. The only thing you have to judge by is if it's fair or a careless (or higher) charge.
In addition to SF's general rule, they should both be running in the same general direction. If one is comming form the side with speed, has eyes only for the player then in most cases its a foul.
If the focus is more on moving into the best line and muscling the opponent off it, then that's likely to be a fair charge. If the focus seems to be on getting the opponent off the line first, and getting onto the right line second, that's increasing the chance of a foul.
Is it a shoulder-to-shoulder 'push', or does he smack into him, shoulder first? Also look out for the exaggerated or heavy step - that's usually a charging foul.
OK, it took me a little while to research this as I didn't have any specific notes about (shoulder) charging but here's what I've come up with.
As far as I can tell, for most of the history of the laws has there wasn't anything specifically referring to the shoulder, in the context of charging. Charging (although only from behind to start with) was included in the laws as an offence from very early days. It wasn't in the original Laws of 1863 but was added in 1869. At the end of Law 9, after the existing wording of, "Neither tripping nor hacking shall be allowed, and no player shall use his hands to hold or push his adversary," the words "nor charge him from behind" were appended.
In 1878, a new sentence was added to law 9 - "A player with his back towards his opponents' goal cannot claim the privilege of Rule 9 when charged behind," a provision that was modified in 1883 by the addition of, "provided, in the opinion of the umpires or referee, he, in that position, is wilfully impeding his opponent."
In 1892 a provision regarding charging goalkeepers was added: "The goal-keeper shall not be charged except he be in the act of playing the ball, or is obstructing an opponent." In 1902, "or when he has passed outside the goal area" was added.
1903 saw the addition of the following: "Cases of [...] charging an opponent from behind, may so happen as to be considered unintentional, and when this is so, no penalty must be awarded."
In 1905, the Law on charging was further modified to say that, "Charging is permissible but it must not be violent or dangerous."
In 1949 a provision was added saying that, "charging fairly, i.e. with the shoulder, when the ball is not within playing distance of the players concerned and they are definitely not trying to play it," was an offence.
The law as regards charging then remained essentially unchanged until 1995 when the idea of intent was removed from the section related to physical contact fouls, and something akin to the current CRUEF criteria was introduced, although the actual wording used was, "careless, reckless or involving disproportionate force."
The ideas that a player could be charged from behind when impeding, and that the goalkeeper could be charged in the three scenarios listed from 1902 onwards, stayed in the Laws till 1997 when they were removed as part of the "great re-write" of that year.
So I think that what you might be recalling from your schooldays is due to the provision that was in the Laws from 1949 up until 1995, and which said there was an offence of "charging fairly, i.e. with the shoulder, when the ball is not within playing distance of the players concerned and they are definitely not trying to play it;"
Although the section of the Laws referring to the offence of charging itself still did not mention the shoulder, the clause above about an "off the ball" charge (even with the shoulder) being illegal, carried the implication that a fair charge was one that was made with the shoulder, when the ball was within playing distance - and was not violent or dangerous.
Later on, in the 'oughties' there was a part of the 'Additional Instructions and Guidelines' section that had the following:
"The act of charging is a challenge for space using physical contact within playing distance of the ball without using arms or elbows.
It is an offence to charge an opponent:
• in a careless manner
• in a reckless manner
• using excessive force"
Again, although this doesn't specifically mention the shoulder, given that the shoulder is not normally seen as part of the arm, it could be argued that this definition at least does not specifically rule out the use of the shoulder.