Is it correct to say I electrocuted my friend if he was only injured by electricity?
The term electrocute was originally coined in 1889¹ by splicing the prefix electro- into the word execute. It originally meant execute (by electric shock). However, its meaning has evolved over time: first to also include accidental death by electric shock and later to include electrical injury,² generally serious in nature. So your use of the word does not fit the original nineteenth century meaning, but is perfectly in line with the broader meaning of the word as it is understood today.
Oxford Dictionaries says:
electrocute: injure or kill (someone) by electric shock.
So, yes, if someone is electrocuted, they can just be injured.
You will sometimes see people use it incorrectly when they actually mean shock or, in other words, when someone or something receives an electrical current.
Electrocution actually derives from electricity + execute: “to put to death by means of electricity”. So the correct usage means that someone or something has been killed via powerful electrical current.
Also I may mention that an electrocution also implies the intent of death. So you may electrocute your friend if the intended outcome is their demise, though they may live through it.
It depends on the degree of precision that’s appropriate for the register you are talking or speaking in.
In more formal use, electrocute would only refer to execution with electricity.
In less formal use, it could refer both to an accidental killing, and a mere injury.
This sense is later, came into the language by extension in colloquial use, and – pertinent to your question – is considered incorrect by some and is at odds with its etymology. It’s this last that makes it better avoided when a formal register or precise use is intended; in day-to-day use it won’t matter that some people might argue pedantically against it, but other times you want to be free from even the worse stickler’s arguments.