“Thereby” is an adverb and it is similar to “de ese modo” or “así. Let´s look at some examples:
- Morales has fled to Monaco, thereby avoiding high Spanish taxes (…ha huido a Mónaco evitando así los altos impuestos españoles).
You could also write (with the same meaning) …“has fled to Monaco, therefore (por lo tanto) avoiding….” or “…has fled to Monaco and consequently avoiding…” Please note that the verb after thereby is “ing”.
- Mr. Sanchez´s aim is to increase his popularity and thereby win the election (el objetivo del Señor Sanchez es aumentar su popularidad y así ganar las elecciones).
Again, you could use “therefore” instead of thereby and have the same meaning.
There is also an expression that uses thereby: thereby hangs a tale (eso tiene su cuento).