eg

In Latin, ‘eg’ is short for ‘exempli gratia’, which means ‘for example’. Use the English term in most cases.
Formal body text
Spell out ‘for example’ or ‘such as’ in formal documents like reports or official letters

Like many shortened forms, the use of ‘eg’ instead of ‘for example’ is quicker and more convenient for the writer, but it can look casual and even a tad lazy to readers.

In most cases, spell out ‘for example’, particularly in more formal documents. In some sentences, ‘such as’ will be the better form.

We applied several criteria, eg price, experience and value for money, when selecting the consultant.
We applied several criteria, such as price, experience and value for money, when selecting the consultant.
Other contexts
Reserve 'eg' for informal texts or where space is limited

Of course, a term that sounds offhand in a formal context might be just what you need in more conversational setting, such as an internal email, a social media post or a web communication.

It can also help where space is limited and time is short.

I’ll be in touch ASAP with your log-in details, eg for the staff intranet.

Punctuation
Place a comma before ‘eg’ and don’t add full stops

If you do decide to use ‘eg’, the other area of uncertainty is how to punctuate it. As with many abbreviations, contemporary style is not to place full stops between each letter (‘e.g.’) because ‘eg’ is cleaner and well understood in English.

Where you use ‘eg’ in a sentence, place a comma before it, as in this response to a web chat customer enquiry:

We can send you the available options, eg the colours we have in stock.