Which elements illustrate acting legally but not ethically?

Which elements illustrate acting legally but not ethically? What would acting ethically and with personal integrity in this situation look like?