How to pass smog test?

So I have a Honda Civic ek hatch with d16y7 engine and it's straight piped which means it's missing o2 sensor causing the check engine light on and I need to get plates for it what's the best way to get around this? The exhaust has no cat. Will I need to replace the whole exhaust? Help! Sososos

Read more: How to pass smog test?