This is probably one of the most popular quotations in Shaw's repertoire. Indeed, photographs like this one abound on the Internet.
The quotation originated in a letter Shaw sent to Ellen Terry (28 Aug. 1896), included in Bernard Shaw Collected Letters Vol. I (1874-1897), p. 645.
"But I dread success. To have succeeded is to have finished one’s business on earth, like the male spider, who is killed by the female the moment he has succeeded in his courtship. I like a state of continual becoming, with a goal in front and not behind. Then, too, I like fighting successful people; attacking them; rousing them; trying their mettle; kicking down their sand castles so as to make them build stone ones, and so on. It develops one’s muscles. Besides, one learns from it: a man never tells you anything until you contradict him."
Incidentally, this and other statements related to male sexuality - sometimes mutually contradictory - are discussed in a very interesting chapter by Kathleen McDougall, entitled "Bernard Shaw and the Economy of the Male Self." The chapter is part of the book Mapping Male Sexuality: Nineteenth-Century England, edited by Jay Losey and William D. Brewer, and published by the Associated University Presses.
From the point of view of "contradiction" as a powerful tool to mine out the truth from people, Shaw followed what he preached. In another letter to Ellen Terry (25 Nov. 1905), he probed her thoughts on whether she considered Frederick Kerr to be the best option to play Brassbound in these terms:
"Unless you contradict me, I shall assume that you prefer him to the available alternatives."
Of course, this tecnique - although effective - was not without detractors. As we can read in an article by Tom Miller (The Shavian 8.8, 2000), professor Harold J. Laski did not enjoy Shaw as a provocateur who fostered conflicting arguments, especially because Shaw seemed to have the sympathetic upper hand from his audience:
"He talks as though he knows that Europe is listening at the keyhole to what he says; and he has, consequently, a reckless disregard for truth where this is in conflict with sensation that I really find a painful thing. And the adulation which surrounds him is irritating beyond words. He says something which makes you revolt; you contradict; and his audience looks at you as though you had spat upon the Eucharist." (8 Jan. 1928)
This is not to imply that Shaw would not "contradict himself" from time to time, as we all know. To quote but one - should I say momentous - example, Beatrice Webb records in his typescript diary (24 May 1927) that while she was "reading proofs of The Intelligent Woman's Guide to Socialism and Capitalism" together with her husband, she pointed out to Shaw that he had "contradicted himself more than once in the book." In Beatrice's recollection of the event, Shaw was "rather impressed especially as I insisted that I did not want him to alter anything he had written."
I wonder if self-contradiction was Shaw's way of getting the truth out of himself?
By the way, Beatrice Webb's both manuscript and typescript diaries are digitized and freely available at the LSE Digital Library. A phenomenal initiative and an endless lode of information for research.