Izaya and Shinra were classmates in Raijin Middle School. On the first day of school, Shinra approached Izaya to invite him to found a Biology Club, for his interest being "human observation." Izaya at first rejects the idea, but becomes intrigued with Shinra as a person. After doing some questioning around with other students, Izaya realizes that Shinra is the opposite of him--having no interest in humans, unlike himself. Wanting to know why Shinra held such disinterest towards humans, Izaya finally agrees to join as the Vice President of the club.
The Biology club is created as merely a front: Shinra uses it for the excuse to have a friend (thus earning the approval of his 'beloved'), while Izaya uses it for Baseball gambling with other students. When Shinra finds out about the gambling, he tries to dissuade Izaya out of it. Nakura, a member of the gambling ring, desperate to get the money back that he'd lost, suddenly comes in to attack Izaya, but Shinra jumps in between and ends up getting stabbed as a result. Izaya takes the blame for the incident and uses it to continually blackmail Nakura through the series.
Izaya attributes this event as something that helped shaped his personalty. He'd felt envy toward his friend who seemed to be "watching humans from a different plane." They later both attend Raijin High school, where Izaya meets Shinra's elementary school friend, Shizuo, and begins a mortal rivalry. After High school, Izaya is seen occasionally hanging out with Shinra at Raira University, though the latter is not a student.
Currently, Izaya believes he isn't an important friend to Shinra, as he treats Celty as his top priority in life. An example of this is when Izaya tried to contact Shinra over the phone while at the hospital. Shinra hung up on him because he was too busy trying to enjoy his date with Celty (especially after having been continually interrupted by other callers). As a result, when it was Shinra's turn to be hospitalized, Izaya decided to also give him the cold shoulder.
Nevertheless, at various points in the novels, it is revealed that Shinra is the only person that Izaya actually considers a friend, and not just one of his "humans." Kisuke Adabashi, the man who injured Shinra, was eventually caught by Izaya's gang and kept confined at his apartment until he escaped by the series' end. Likewise, Shinra views Izaya as one of his only friends, and constantly defends him in front of Shizuo and Celty, even though he knows that "there's not a single ounce of goodness in him."
Shinra is Izaya's opposite. While Izaya possesses 'fond' feelings toward all humans, Shinra does not possess ANY feelings or interests towards them at all. Because Shinra is so absorbed on Celty, who is a non-human, he practically lives in a different world. Despite his lack of interest in humans, Izaya thinks that Shinra's assessment of them is accurate. He was the first person to have seen through Izaya's nature, yet they still remained on friendly terms (unlike other people who express disgust toward Izaya once they see through him).
Yet because Shinra is able to remain objective toward all humans--neither liking nor disliking them, regardless of how bad or good they are--it is difficult to tell what he really feels as far as 'friendship.' Moreover, Izaya claims to see all humans equally, whether they're his friends or his family or neither.
Their friendship can therefore best be described as "bizarre."
"He may seem cold-blooded, but he is more human, and his heart more brittle than anybody else, so much so that if you filled it with human love or betrayal, it would break easily, which is why, I think, he chose from the start to avoid it all, to love humanity, you understand? Not to accept, not to face it, to avoid it." '- Kishitani Shinra, Durarara!! Volume 13