E.g. is the abbreviation for grateful example, Latin expression that means "for example", in Portuguese.
This Latin abbreviation is common mainly in legal texts, either in the form e.g. as also e.g. (verbi gratia), which has a meaning equivalent to that of example gratia.
So, you should use the e.g. to indicate that the following text consists of examples referring to what is before the abbreviation.
Example: "Don't forget to buy fruit (e.g. apples, bananas, grapes and pears)."
As a rule, the e.g. must be used in parentheses, followed by examples that are related to the previous clause, as in the example above.
In Portuguese, it is common to replace e.g. by e.g. ("for example"), but it is advisable to use the abbreviation of the Latin expression, mainly because it is easy to understand in other languages, for example.
E.g. and i.e.
I.e. is the abbreviation of the Latin expression id you and means "that is", in Portuguese. As e.g., i.e. it is also often common in legal or scientific texts, for example.
Unlike the e.g., which is used to give examples of what was said, the i.e. it serves to signal the explanation, specification or description of a statement made earlier in the text.
Example: "The whale is a mammal, i.e., an animal that is bred in the female's uterus and feeds on breast milk."
As they are an abbreviation of Latin expressions, both must be written in italics.
Learn more about meaning of ie.