He has similar behavior with his friends = "similar" here is just an adjective and is not connected with the word "with". Just because I say "he has similar behaviour when he is with me", it doesn't mean there is a structure "similar when"
"He has similar behavior to his friends = "similar to" is correct (his behaviour and his friends' behaviour are similar)
He has similar behavior like his friend = I wouldn't use this as "similar" and "like" have the same kind of meaning here, it's repetition. ("He has similar behaviour to his friends" OR "his behaviour is like his friends' behaviour).
The structure is SIMILAR TO
Hope this helps.