To solve this problem, we first need to define the decision variables and the objective function. Let's denote the number of pepperoni pizzas as `x` and the number of Hawaiian pizzas as `y`. The profit per pepperoni pizza is $4, and the profit per Hawaiian pizza is $5. Therefore, the total profit can be represented by the objective function: `4x + 5y`.

The constraints given in the problem are:
1. Sell at least 35 pepperoni pizzas but no more than 40: `35 <= x <= 40`.
2. Sell at least 40 Hawaiian pizzas but no more than 70: `40 <= y <= 70`.
3. The total number of pizzas sold cannot exceed 90: `x + y <= 90`.

We aim to maximize the profit, so we will use these constraints and the objective function in a linear programming model.

Here is how we translate this into Gurobi code:

```python
from gurobipy import *

# Create a new model
m = Model("Pizza_Shop_Profit")

# Define variables
x = m.addVar(name='pepperoni_pizzas', vtype=GRB.INTEGER, lb=35, ub=40)
y = m.addVar(name='hawaiian_pizzas', vtype=GRB.INTEGER, lb=40, ub=70)

# Objective function: Maximize profit
m.setObjective(4*x + 5*y, GRB.MAXIMIZE)

# Constraint: Total pizzas sold cannot exceed 90
m.addConstr(x + y <= 90, name='total_pizzas')

# Solve the model
m.optimize()

# Print solution
if m.status == GRB.OPTIMAL:
    print('Optimal solution found:')
    print(f'Sell {x.x} pepperoni pizzas')
    print(f'Sell {y.x} Hawaiian pizzas')
    print(f'Total profit: ${4*x.x + 5*y.x}')
else:
    print('No optimal solution found')

# Print model
m.write("pizza_shop_model.lp")
```